In OS X desktop application
NSFileManager *manager = [NSFileManager defaultManager];
NSDictionary *dirMeta = [NSDictionary dictionaryWithObjectsAndKeys:@"jack", @"creator", nil];
NSLog(@"%@", [dirMeta objectForKey:@"creator"]);//output jack
[manager createDirectoryAtPath:@"/Users/loki/Desktop/fromCap" withIntermediateDirectories:YES attributes:dirMeta error:NULL];
NSDictionary *attri2 = [manager attributesOfItemAtPath:@"/User/loki/Desktop/fromCap" error:nil];
NSLog(@"value is %@", [attri2 objectForKey:@"creator"]);//output null
Am I using createDirectoryAtPath wrongly?
Why attri2 get nothing data out of the directory?
The attributes dictionary is used to specify the filesystem attributes of the new directories/files:
They are not for attaching arbitrary meta data. Where did you suppose this meta data would be stored anyway?