• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Filtering out all invisible files in a file system browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filtering out all invisible files in a file system browser


  • Subject: Re: Filtering out all invisible files in a file system browser
  • From: Jeremy Dronfield <email@hidden>
  • Date: Tue, 9 Nov 2004 16:56:34 +0000

On 9 Nov 2004, at 12:48 pm, stephane sudre wrote:


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

Are you saying that the only way to filter out those last files is to check for them individually by name?


Regards,
Jeremy

_______________________________________________
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


References: 
 >Filtering out all invisible files in a file system browser (From: Jeremy Dronfield <email@hidden>)
 >Re: Filtering out all invisible files in a file system browser (From: stephane sudre <email@hidden>)

  • Prev by Date: Re: NSView lockFockus assertion?
  • Next by Date: Re: Filtering out all invisible files in a file system browser
  • Previous by thread: Re: Filtering out all invisible files in a file system browser
  • Next by thread: Re: Filtering out all invisible files in a file system browser
  • Index(es):
    • Date
    • Thread