代码-Documents路径
1 NSString * result; 2 NSArray * paths; 3 4 result = nil; 5 paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); 6 if ( (paths != nil) && ([paths count] != 0) ) { 7 assert([[paths objectAtIndex:0] isKindOfClass:[NSString class]]); 8 result = [paths objectAtIndex:0]; 9 }