Re: Invisible Files
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.