代码-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 }
posted @ 2012-06-11 10:02  Kalou  阅读(147)  评论(0编辑  收藏  举报