Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2006 23:59:59 -0800
From:      conrad@mac.com
To:        Mark Day <mday@apple.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Add a file flag for "hidden" files?
Message-ID:  <a06230901c02c4bf04a6a@[10.0.1.5]>
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
At 9:48 AM -0800 3/1/06, Mark Day wrote:

>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.
>
>Windows file systems (FAT, NTFS, SMB) have a "hidden" attribute bit
>on files and directories.  If a file or directory has this attribute
>set, Windows will not normally show it in the GUI unless you
>explicit ask to view hidden items.  Mac file systems (HFS, AFP) have
>a similar notion called the "invisible" bit, which is just one part
>of the Finder Info (which also contains things like file type and
>creator information, icon position, etc.).
>
>Mac OS X has a mechanism for storing Finder Info on file systems
>without native support for Finder Info, by using extra files known
>as AppleDouble or "dot underscore" files (because their name is the
>original file's name with "._" prepended).  The management of the
>AppleDouble files happens in application-layer libraries in Mac OS X
>10.3.x and earlier, and also in the VFS layer in Mac OS X 10.4.x and
>later.  It would be complex to try to push the AppleDouble support
>down into the Windows file systems merely so they could shadow their
>native hidden bit into the invisible bit of the Finder Info.  The
>file flags are very easy for individual file systems to implement.

Hey Mark

This is great with MS' SMB servers, and also with local filesystems, 
as they can easily have UF_HIDDEN added.  What are you thinking for 
other filesystems, for remotely served filesystems, that is, which 
for whatever reason don't read/write UF_HIDDEN?

Conrad Minshall



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