in reply to Re^2: Most recently created file in a folder
in thread Most recently created file in a folder
My personal preference for reading a directory without recursion is to use opendir/readdir. That way, you can check for errors easier (e.g. does the full path exist, do you have permissions to access it, etc). You also don't have the overhead of using glob, nor relying on how the system decides to expand '*', which should be everything anyway (well, except for dot files under Unix).
bluto
|
|---|