Add a file flag for "hidden" files?
Eric Anderson
anderson at centtech.com
Wed Mar 1 10:20:54 PST 2006
Mark Day wrote:
> Hello,
>
> For an future version of Mac OS X, I'm trying to solve a problem where
> certain files and directories on Windows file systems don't normally
> appear in the Windows GUI, but currently do appear in the Mac OS X GUI
> (but they shouldn't). I'd like to gauge interest in having the change
> ported back to FreeBSD (since many of our file systems are derived
> from FreeBSD). The approach I'm planning to use is to add a new flag
> to the file flags (i.e. the st_flags field from stat(2); settable via
> chflags(2)). I'd like to avoid a collision with any flags FreeBSD
> would add in the future, so either have FreeBSD adopt the flag, or
> start allocating Mac OS X-specific flags from the high order bits
> (since FreeBSD has been allocating them from the low order bits). My
> current name for this new file flag is UF_HIDDEN.
[..snip..]
> I could certainly provide patches to FreeBSD for the headers, FAT,
> NTFS, and probably HFS. The strtofflags(3) and fflagstostr(3)
> functions should also change so you can get at the flag bit via ls(1),
> find(1), chflags(1), etc.; I think I could provide that patch, too.
> (I've never actually used FreeBSD, so it will take me a bit of time to
> get it installed, find my way around the sources, make and test the
> changes.)
>
Wow - about a week ago, I started looking into this same feature for
FreeBSD, because I'd like to hide directories and files for UFS2
snapshots. I came to nearly the same conclusion, using chflags, etc,
and even the name for the flag. :)
Anyhow, this is obviously a feature that would be useful to many people,
however don't be discouraged if you get little response about it. It's
a 'if you built, they will come' kind of feature anyhow.
Eric
--
------------------------------------------------------------------------
Eric Anderson Sr. Systems Administrator Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------
More information about the freebsd-fs
mailing list