• 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: Invisible Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invisible Files


  • Subject: Re: Invisible Files
  • From: Mel Walker <email@hidden>
  • Date: Fri, 7 Feb 2003 14:15:45 -0700

On Friday, February 7, 2003, at 01:37 PM, email@hidden wrote:

With a Cocoa app, how do I find out if a folder in the finder is invisble?

I had to dip into Carbon for the full effect.

FSRef possibleInvisibleFile;
FSCatalogInfo catalogInfo;
BOOL isHidden = NO;
NSString *fullFile = some_path_to_a_file;
errStat = FSPathMakeRef([fullFile fileSystemRepresentation], &possibleInvisibleFile, nil);
FSGetCatalogInfo(&possibleInvisibleFile, kFSCatInfoFinderInfo, &catalogInfo, nil, nil, nil);
isHidden |= (((FileInfo*)catalogInfo.finderInfo)->finderFlags & kIsInvisible) ? 1 : 0;

This does seem to work, though -- no invisible files have slipped through. At least, not that I've seen. :-)

--
Mel Walker <email@hidden>
Software Engineer
Home phone: (801) 731-1105
"I'm fine, but I need more funding."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Pipes and helper tool
  • Next by Date: Localizable.strings inside framework bundles
  • Previous by thread: Re: Invisible Files
  • Next by thread: Pipes and helper tool
  • Index(es):
    • Date
    • Thread