Re: Filtering out all invisible files in a file system browser
Re: Filtering out all invisible files in a file system browser
- Subject: Re: Filtering out all invisible files in a file system browser
- From: "John C. Daub" <email@hidden>
- Date: Wed, 10 Nov 2004 09:01:31 -0600
on 11/9/04 11:10 AM, M. Uli Kusterer at email@hidden wrote:
> At 16:56 Uhr +0000 09.11.2004, Jeremy Dronfield wrote:
>> I'd assumed there would be some way of filtering out all these
>> invisible files. Do I have to check individually by name for all the
>> ones which don't have "." prefixes and don't (seem to) have the
>> kIsInvisible flag?
>
> No, there isn't. There are three criteria which files are invisible,
> "." at the start of the name, kIsInvisible and name is in the
> ".hidden" file. IIRC there were even a few special folders (Network?)
> which weren't in either of these lists but were not shown anyway.
Actually there are more criteria than that.
An item can be invisible due to a parent folder being invisible. If you've
got FileA inside FolderB and FolderB is invisible, then FileA is invisible
as well.
This spills into the /.hidden file as well. A lot of the items in the
/.hidden file are folders, and thus all things below them are invisible as
well. So often what you must do is get the file/folder then walk up all its
parent folders to see if the parent is invisible. Of course if you're
writing a file system browser and starting at the top, this is a bit easier
because you can determine that folder X is invisible and thus just never
bother navigating to anything below it.
An item can also be invisible if it's within a package (note, not a bundle,
a package). Of course, if this is within your definition of "invisible" or
not depends on what you're doing. Still tho, at least from a typical Finder
perspective an item within a package is invisible.
--
John C. Daub }:-)>=
<mailto:email@hidden> <http://www.hsoi.com/>
"I hold all the combinations to give you peace of mind." - Dave Wyndorf
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden