Marco van de Voort
marcov at stack.nl
Thu May 1 17:34:49 CEST 2008
> Am Donnerstag, 1. Mai 2008 17:17 schrieb Marco van de Voort:
> > DT_LNK 10
> > DT_SOCK 12
> > DT_WHT 14
> > But why do you not simply use findfirst/findnext? It's more portable.
> The result of d_type is always 0 even if the entry is a directory.
Then you'll have to do a fpstat to get additional data.
> Your question is not easy to answer. In one way you are right, but I like
> to program as close to the os as possible.
In general findfirst/findnext is ok, unless you are creating e.g. an unix
specific backup application that touches hundreds of thousands of files.
> Does findfirst/findnext also support these things like '*.pas' and file
It supports wildcards. The file attributes are limited to the ones in
searchrec, see help for more info.
More information about the fpc-pascal