• 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: 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
  • Follow-Ups:
    • Re: Filtering out all invisible files in a file system browser
      • From: Jeremy Dronfield <email@hidden>
References: 
 >Filtering out all invisible files in a file system browser (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Filtering out all invisible files in a file system browser
  • Next by Date: Re: Multi-keystroke text input issue
  • Previous by thread: 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