Re: interface to ask is a file is hidden

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

 



Hi,

On 10 Oct 2008, at 22:57, Theodore Tso wrote:
Ext3 has no concept of "hidden file".  Niether does ext2, ext4, jfs,
xfs, reseirfs, ufs, etc.

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.

Sorry but you are somewhat wrong: UFS, HFS/HFS+, ZFS, and AFP all support the UF_HIDDEN file flag (in addition to the ones you state above).

In Mac OS X this is settable via chflags(2) and fchflags(2) and "ls" can display whether this flag is set by calling "ls -lO" for example (stat(2) returns the flags in st_flags). The Finder is the primary application which then hides such marked files from the GUI view analogous to how Windows Explorer hides hidden files.

PS. For completeness sake: On Mac OS X the hidden flag is also mirrored in the Finder Info. Also, all the flags can be obtained/set via getattrlist(2)/setattrlist(2) via ATTR_CMN_FLAGS in addition to chflags(2)/stat(2).

Best regards,

	Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/

--
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