mach and mach.sym files?
mach and mach.sym files?
- Subject: mach and mach.sym files?
- From: Steve Gehrman <email@hidden>
- Date: Wed, 27 Jun 2001 14:25:33 -0700
I'm displaying a list of files at path "/" and I'm trying to eliminate
invisible files (like the finder), but there are two files:
mach and mach.sym that show up despite my attempts to filter invisible
files.
Is there an attribute of those files that is something I can use
consider them invisible. What does the Finder do?
here's my code...
+(BOOL)isInvisible:(NSString*)path
{
NSString* fileName = [path lastPathComponent];
if ([fileName length] > 0)
{
unichar firstChar = [fileName characterAtIndex:0];
if (firstChar == '.')
return YES;
else
{
FSRef fsRef;
LSItemInfoRecord infoRec;
OSStatus status;
// SNG - does this leak memory?
FSPathMakeRef([path fileSystemRepresentation], &fsRef, nil);
status = LSCopyItemInfoForRef(&fsRef,
kLSRequestBasicFlagsOnly, &infoRec);
return (infoRec.flags & kLSItemInfoIsInvisible);
}
}
return NO;
}
steve