Re: hiding files and directories



On 4 Mar 2003, Bastien Nocera wrote:

> Heya,
> 
> Is there any way to hide some files in Nautilus other than by using the
> Unix "the first character of the name is a dot" semantic ?

There is none currently I think.
 
> I'd like to hide the "iPod_Control" directory of my iPod. MacOS X hides
> it properly (it's where the songs are stored, and doesn't present much
> interest on its own).
> 
> I would probably also use that to hide directories in my home.
> 
> Would adding some bits to GnomeVFSFileFlags be the way to go (along with
> fixing the different modules, obviously) ?

Sounds like a good way to me. (Although it can't go on the 2.2 branch 
since its an API addition.)
 
> And we could add the metadata bits to Nautilus on top of that
> (nautilus_file_[gs]et_metadata).

Hmmm. Although that would add more per-file metadata lookups, and might 
look strange if the metadata is asynchronously read after the file has 
been read.
 
> Anybody already thought this out in some way ?

This is the way MacOS X does it [1]:
In Mac OS X, there are three different ways a file or directory can be 
made invisible in the finder: it can have the "invisible" attribute set 
(as in older Mac OS systems), its name can start with "." (as in other 
unix systems), or its name can be listed in the .hidden file. Many of the 
files and directories listed above are actually invisible for multiple 
reasons (e.g. /bin is listed in /.hidden, as well as having its invisible 
attribute set). Note that since traditional Mac OS only recognizes the 
invisible flag, some of these files (mainly /.vol, /mach, /mach.sym, and 
sometimes .DS_Store) will be visible when you boot into Mac OS 9.

[1] http://www.westwind.com/reference/OS-X/invisibles.html#reasons

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a fast talking moralistic card sharp who hangs with the wrong crowd. 
She's a provocative Buddhist bodyguard trying to make a difference in a man's 
world. They fight crime! 




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