Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Mar 2006 12:20:49 -0600
From:      Eric Anderson <anderson@centtech.com>
To:        Mark Day <mday@apple.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Add a file flag for "hidden" files?
Message-ID:  <4405E601.7010304@centtech.com>
In-Reply-To: <DBD69E00-A9CB-45BA-8398-2A662D18D781@apple.com>
References:  <DBD69E00-A9CB-45BA-8398-2A662D18D781@apple.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
------------------------------------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4405E601.7010304>