Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Re: Get newest file

by Rich36 (Chaplain)
on Oct 27, 2002 at 20:31 UTC ( #208377=note: print w/replies, xml ) Need Help??

in reply to Re: Get newest file
in thread Get newest file

Actually, after considering Zaxo and tadman's responses, you might be better off altering the code above to find the directory with the most recent modified time (Zaxo's suggestion), then use glob on that directory (tadman's suggestion) to find the most recent file. That might be more efficient given the number of files and directories that you are searching through because you would only be storing directories in the hash and the application would not be calling stat on all those files.


Replies are listed 'Best First'.
Re: Re: Re: Get newest file
by Spida (Acolyte) on Oct 27, 2002 at 21:00 UTC
    Half of the files are in two directories, with more than 200000 each. With going for the directory with the newest modified time, that would save me from checking more than 65% of the total...
    as a work-around, I could just ask the user about the version he installed...
    AFAIK the freedb has no other method included to check the db-version...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://208377]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2021-04-11 09:27 GMT
Find Nodes?
    Voting Booth?

    No recent polls found