Add a file flag for "hidden" files?
Robert Watson
rwatson at FreeBSD.org
Wed Mar 1 10:42:56 PST 2006
On Wed, 1 Mar 2006, Mark Day wrote:
> On Mar 1, 2006, at 10:22 AM, Robert Watson wrote:
>
>> I don't see any problem with this. The only flag I know of in FreeBSD that
>> might not appear in Mac OS X is the system snapshot flag, which was added
>> to UFS after Apple forked from the FreeBSD source.
>
> Mac OS X is missing both the NOUNLINK and the SNAPSHOT flags.
>
> Since Mac OS X doesn't implement the functionality corresponding to either
> bit, my plan was to leave those #defines commented out in the Mac OS X
> headers, with a comment indicating we don't implement that functionality.
> I'm a little concerned that an app might see those bits defined, try to use
> the functionality, and be surprised when it doesn't work as expected.
Sounds good -- as long as they are marked as reserved values in Mac OS X, that
should (hopefully) prevent later collisions.
>> We have talked about adding a flag to hint the presence of extended ACL
>> data also, so that applications know if they should rely solely on stat()
>> for protection information, or also call acl_get_{fd,file,link}() to
>> receive extended ACL data for ls(1) output. Is your plan to mask hidden
>> files solely in user space, or to look at masking it in kernel also?
>
> I knew I'd forgotten to mention something. The plan is that this bit is
> purely a hint to user space. It's up to the application (especially a GUI)
> to decide whether to show a hidden file to the user or not.
Sounds good. Do you plan to implement a hidden flag only in the user flag
range, or also a system hidden flag?
Robert N M Watson
More information about the freebsd-fs
mailing list