• 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
wrapper bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: wrapper bug?
      • From: "Philip Q" <email@hidden>
  • Prev by Date: Accessing instance variables from value transformer
  • Next by Date: Re: wrapper bug?
  • Previous by thread: Re: Accessing instance variables from value transformer
  • Next by thread: Re: wrapper bug?
  • Index(es):
    • Date
    • Thread