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: stephane sudre <email@hidden>
- Date: Tue, 9 Nov 2004 13:48:57 +0100
On Nov 9, 2004, at 1:43 PM, Jeremy Dronfield wrote:
I'm using an NSBrowser for file system browsing. I don't want it to
display files/folders which are invisible in the Finder, but there are
some which I just don't seem able to block. Here's the method I'm
using to determine whether a file is invisible and should be excluded
from the tree:
- (BOOL)isVisible {
if ([[self lastPathComponent] hasPrefix:@"."])
return NO;
FSRef possibleInvisibleFile;
FSCatalogInfo catalogInfo;
OSStatus errStat = FSPathMakeRef([[self absolutePath]
fileSystemRepresentation], &possibleInvisibleFile, nil);
FSGetCatalogInfo(&possibleInvisibleFile, kFSCatInfoFinderInfo,
&catalogInfo, nil, nil, nil);
if (((FileInfo*)catalogInfo.finderInfo)->finderFlags & kIsInvisible)
return NO;
return YES;
}
This filters out most invisible files and folders, but some still get
through: e.g. mach.sym, mach_kernel, opt. Can anyone suggest what else
I can do to get full Finder-type invisibility?
cd /
more .hidden
_______________________________________________
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