Re: interface to ask is a file is hidden

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 10, 2008 at 05:57:22PM -0400, Theodore Tso wrote:
> The only ones that would have that concept is vfat (which supports
> fat16/fat32), ntfs, nfsv4 and cifs/smbfs.  Even a filesystem which
> normally has very bad taste, MacOS's HFS, doesn't support the hidden
> attribute.

Actually, HFS and HFS+ have an "invisible" bit for each entry. This is
read by Finder to tell if it should show an icon for that particular
file or directory. This is similar to the MSDOS hidden attribtue. I
don't think we currently expose that in any way, although it used to
be exposed in HFS if you were using one of the optional modes to
expose the Mac metadata for sharing over AFP.

I will admit that structurally it's very different from the way FAT
handles such a thing. The invisible bit is part of the FinderInfo
structure that is really just the metadata for Finder to draw the
views correctly and just happens to be stored inside the filesystem
metadata area (similar to the way a unix filesystem does xattrs). It
even includes things like point and rect info for icon placement.

>From hfs.h:
/* bits hfs_finfo.fdFlags */
#define HFS_FLG_INVISIBLE       0x4000

I'll also be clear that this doesn't get used by ls or other UNIX
type utilities on OSX. It's purely metadata for Finder.

	Brad Boyer
	flar@xxxxxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux