Date: Thu, 2 Mar 2006 09:35:55 -0800 From: Mark Day <mday@apple.com> To: conrad@mac.com Cc: freebsd-fs@freebsd.org Subject: Re: Add a file flag for "hidden" files? Message-ID: <B721C0C4-706A-4B2F-A991-070E6B0B32E6@apple.com> In-Reply-To: <a06230901c02c4bf04a6a@[10.0.1.5]> References: <DBD69E00-A9CB-45BA-8398-2A662D18D781@apple.com> <a06230901c02c4bf04a6a@[10.0.1.5]>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Conrad, On Mar 1, 2006, at 11:59 PM, conrad@mac.com wrote: > This is great with MS' SMB servers, and also with local > filesystems, as they can easily have UF_HIDDEN added. Yeah, George is eagerly awaiting the bit so he can use it in SMB. > What are you thinking for other filesystems, for remotely served > filesystems, that is, which for whatever reason don't read/write > UF_HIDDEN? If they can pass the bit through and have it preserved somewhere, then do that. (If the server doesn't understand the meaning of the bit, then at least preserving it for clients seems better than ignoring it or returning an error.) Otherwise, I suppose they'd have to treat it like any other flag bit that they don't understand, or the server doesn't support. I assume that means returning an error if the caller attempts to set UF_HIDDEN. Looking at the error codes listed for chflags(2) [in the online FreeBSD man page], there is no EINVAL listed, but there is EPERM and EOPNOTSUPP. I'm not sure which one I'd choose. I can also see an argument that such a file system should just ignore the UF_HIDDEN bit and not return an error because the flag is meant as a hint to applications, not meant to be enforced by the file system. FYI, Mac OS X has a mechanism for a file system to tell its clients which functionality it supports (volume capability bits, returned by the getattrlist(2) call). In Mac OS X, I'll be adding a new volume capability bit that indicates whether a volume supports the hidden flag. The Carbon framework, which will be the major user of the hidden flag, is expected to check the volume capability bit and not even attempt to set the UF_HIDDEN flag on file systems which don't support it. It will instead use the invisible bit of the Finder Info, which would probably be stored in an AppleDouble file on such a file system. -Mark
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B721C0C4-706A-4B2F-A991-070E6B0B32E6>