Sebastian Kraft wrote:
Am Samstag, 2. September 2006 05:29 schrieb Cesar Romero:
I have had some headaches while using FindFirst function to search for
files in a folder.
I would share some gained knowledge with the people on this list.
Everybody knows about file attributes (archive, system, hidden, read
only).
If someone use FindFirst('*.*', faAnyFile, SearchRec) it assumes that
faAnyFile is enough to get every file from the directory.
No, it is not. If a file has none of the attributes set, the faAnyFile
will not include that file in the search.
Those files, without any of the mentioned attributes set, they have
attribute Normal, and this attribute is not defined as faNormal
anywhere in RTL ( see
http://www.freepascal.org/docs-html/rtl/dos/fileattributes.html ).
If one would like to get all the files from a folder by using
FindFirst and FindNext, then he should use:
FindFirst('*.*', faAnyFile or $00000080, SearchRec);
Perhaps you should report this to FPC... so if it's a bug it can be solved.
It is not a bug, it is not implemented even in Delphi's RTL.
If FPC would implement this, then it would be a feature over Delphi's
implementation.
regards
Boban Spasic
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives