• 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
Filtering out all invisible files in a file system browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Filtering out all invisible files in a file system browser


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

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?

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


  • Follow-Ups:
    • Re: Filtering out all invisible files in a file system browser
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Filtering out all invisible files in a file system browser
      • From: stephane sudre <email@hidden>
  • Prev by Date: Re: New Spotlight Info
  • Next by Date: Re: Filtering out all invisible files in a file system browser
  • Previous by thread: Start Editing Table Cell After NSArrayController Insert
  • Next by thread: Re: Filtering out all invisible files in a file system browser
  • Index(es):
    • Date
    • Thread