关于iOS沙盒路径
2016-10-14 本文已影响0人
Aurora166
1,获得沙盒文件夹URL
形式1:
NSURL *pathUrl = [NSURL fileURLWithPath:NSTemporaryDirectory()];
形式2:
NSURL *pathUrl = [NSURL fileURLWithPath:NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0]];
形式3:
NSURL *pathUrl = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject];