Mail Archives: djgpp/1998/07/01/10:32:29
On Wed, 1 Jul 1998, Dim Zegebart wrote:
> I'm porting my DJGPP code to Linux and I'm faced with problem
> what findfirst() doesn't exist in Linux libc :(
IMHO, you shouldn't have used findfirst in a portable code in the first
place. The Posix way to do that is to use opendir/readdir and (if you
need more than just a name) stat. If you need to filter the files, use
fnmatch to match file names returned by readdir against a wildcard.
Another possibility is to use glob and then work on the list of file
names it returns. (On Unix, glob will call opendir, readdir and fnmatch
internally.)
- Raw text -