[fpc-devel] FindFirst under Linux doesn't set faHidden
graemeg.lists at gmail.com
Thu Aug 16 10:18:20 CEST 2007
As per the documentation:
The file is hidden. (On unix, this means that the filename starts
with a dot)
I've tried this today using FPC 2.1.5 and faHidden doesn't seem to be set, ever.
Below is a list of files I tested on under Linux. I first printed the
filename found by FindFirst/FindNext and then I printed True or False
if the faHidden attribute was set. As you can see even for files with
the '.' (dot) prefix, the faHidden is never set.
I know unix OS's don't have a real notion of 'hidden' files, but it is
a standard to treat dot prefix files as hidden. The FPC documentation
mentions that and Kylix treated it like that as well.
Can anybody else confirm this, before I submit a bug report?
Oh, and here is the function I use to test the attribute:
// Example: HasAttrib(sr.Attr, faHidden) returns True if faHidden was set.
function HasAttrib(fileAttrib, testAttrib: Integer): Boolean;
Result := (fileAttrib and testAttrib) <> 0;
- Graeme -
More information about the fpc-devel