wrapper bug?
wrapper bug?
- Subject: wrapper bug?
- From: Roland Silver <email@hidden>
- Date: Mon, 14 May 2007 07:07:06 -0600
In my WrapperBug project folder (/Users/rollos/WrapperBug), I have a
data file called "file1" and a folder called "folder" containing an
alias to file1 called "file1Alias".
How come executing the following code results in the messages
wrapper2 filename=file1Alias
wrapper2 is a regular file
rather than
wrapper2 filename=file1Alias
wrapper2 is a link wrapper
?
-(void)awakeFromNib {
NSString* path1 = @"/Users/rollos/WrapperBug/folder";
NSFileWrapper* wrapper1 = [[NSFileWrapper alloc] initWithPath:path1];
if ([wrapper1 isDirectory]) {
NSDictionary* dictionary = [wrapper1 fileWrappers];
NSFileWrapper* wrapper2 = [dictionary valueForKey:@"file1Alias"];
NSLog(@"wrapper2 filename=%@", [wrapper2 filename]);
if([wrapper2 isSymbolicLink]) {
NSLog(@"wrapper2 is a link wrapper");
} else if ([wrapper2 isDirectory]) {
NSLog(@"wrapper2 is a directory");
} else if ([wrapper2 isRegularFile]) {
NSLog(@"wrapper2 is a regular file");
} else {
NSLog(@"wrapper2 is none of the above");
}
}
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden