From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Larsson Subject: Re: interface to ask is a file is hidden Date: Mon, 13 Oct 2008 12:59:57 +0200 Message-ID: <1223895597.20751.34.camel@fatty> References: <641322f90810101222p3ff36ac3va9057b9958d2abf2@mail.gmail.com> <20081010192104.GD19500@unused.rdu.redhat.com> <20081010193503.GE23734@samba1> <641322f90810101300v3ab5fc15hb20fca0374ebe4b4@mail.gmail.com> <20081010215722.GG8645@mit.edu> <2FF8DF17-4056-447B-B18C-40103BFD2E73@cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Theodore Tso , =?ISO-8859-1?Q?Nicol=F2?= Chieffo <84yelo3@gmail.com>, Jeremy Allison , Szabolcs Szakacsits , Josef Bacik , linux-fsdevel@vger.kernel.org To: Anton Altaparmakov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:35204 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753829AbYJMLAP (ORCPT ); Mon, 13 Oct 2008 07:00:15 -0400 In-Reply-To: <2FF8DF17-4056-447B-B18C-40103BFD2E73@cam.ac.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, 2008-10-13 at 08:29 +0100, Anton Altaparmakov wrote: > 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). FreeBSD seems to have added UF_HIDDEN to struct stat.st_flags back in 2006: http://updraft3.jp.freebsd.org/cgi/query-pr.cgi?pr=kern/94519 They also have other useful flags like immutable, append only, no dump, etc that certainly apply to ext3 too (i.e. these are settable with chattr). Sounds like a very good idea to me. There is even availible unused space in the userspace/glibc struct stat to add them, and there seems to be some in the kernel struct too. They also have chflags/lchflags/fchflags to change these attributes.