Am Donnerstag, den 01.05.2008, 16:54 +0200 schrieb Rainer Stratmann: > Am Donnerstag, 1. Mai 2008 17:17 schrieb Marco van de Voort: > > d_type being > > > > DT_UNKNOWN 0 > > DT_FIFO 1 > > DT_CHR 2 > > DT_DIR 4 > > DT_BLK 6 > > DT_REG 8 > > 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.
What os are you on? I did "man readdir" and "man dirent" and found enough information. One bit from the dirent manpage: BUGS The usage of the member d_type of struct dirent is unportable as it is FreeBSD-specific. It also may fail on certain filesystems, for example the cd9660 filesystem. Maybe that's hitting you ... HTH, Marc _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal