Quote:
Originally posted by Perderabo
You can use readdir() to read a directory. Then use lstat() on each file.
That is definately more reliable than a tmp file, but another solution - just for giggles - would be to use popen on the command and avoid the temp file, reading the output of the ls command directly through the pipe.
Just a thought...popen is not the best solution in this case - given the various shells aliases and things could preclude the ls from functioning as desired - but popen is a nice thing to explore.