在 OS X 桌面应用程序中
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
我是否错误地使用了 createDirectoryAtPath?为什么 attri2 没有从目录中获取任何数据?