fileExistsAtPath:isDirectory - BROKEN?
fileExistsAtPath:isDirectory - BROKEN?
- Subject: fileExistsAtPath:isDirectory - BROKEN?
- From: Bruce Truax <email@hidden>
- Date: Wed, 02 Nov 2005 14:47:28 -0500
- Thread-topic: fileExistsAtPath:isDirectory - BROKEN?
I am having trouble with fileExistsAtPath:isDirectory. I have been using
this for some time and today, after upgrading to 10.4.3 it appears to be
broken. The isDirectory flag does not appear to be set properly. Here is
my code snippet:
NSFileManager *fileManager = [NSFileManager defaultManager];
aliasPath = [[NSString alloc] initWithFormat:@"~/Library/AccosLnks"];
NSLog(@"isDir %i", isDir);
[fileManager fileExistsAtPath:[aliasPath stringByExpandingTildeInPath]
isDirectory:&isDir];
if (!([fileManager fileExistsAtPath:[aliasPath
stringByExpandingTildeInPath] isDirectory:&isDir] && isDir)){
[fileManager createDirectoryAtPath:[aliasPath
stringByExpandingTildeInPath]
attributes:nil];
NSLog(@"isDir %i", isDir);
[aliasPath release];
}
No matter whether the directory exists or not, isDir is always NO. I even
tried to set isDir to another value prior to the test and it just retains
the original value. Am I doing something wrong or is this a bug?
Bruce
--
____________________________________________________________
Bruce E. Truax email: email@hidden
Optical Engineering Consultant
Diffraction Limited Design LLC
388 Wedgewood Road voice: 860-276-0450
Southington, CT 06489 fax: 860-620-9026
http://www.dld-llc.com
_____________________________________________________________
_______________________________________________
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