FileManager.m 这个文件中有如下的代码,是用来创建 cache目录的,但它会报警告。
[fileManager createDirectoryAtPath:cachePath attributes:nil]
具体原因参看: http://www.cocoachina.com/bbs/read.php?tid=36048
[NSFileManager defaultManager] createDirectoryAtPath:path attributes:nil];
这句代码出现警告信息:
'createDirectoryAtPath:attributes:' is deprecated
不太明白怎么回事 求指教~
-----------------------------------------------------
这个意思是说在以后的版本中这个API有可能被抛弃,所以苹果不赞成你使用这个API,一般会有另一个API取代它!
对于你用的这个方法:
- (BOOL)createDirectoryAtPath:(NSString *)path attributes:(NSDictionary *)attributes;
在 Leopard 之后就不赞成使用了取而代之的是:
- (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(NSDictionary *)attributes error:(NSError **)error;