//得到Document目录:
NSArray
*paths = NSSearchPathForDirectoriesInDomains(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
NSString
*documentsDirectory = [paths
objectAtIndex
:
0
];
//得到temp临时目录:
NSString
*tempPath = NSTemporaryDirectory();
//得到目录上的文件地址:
NSString
*文件地址 = [目录地址
stringByAppendingPathComponent
:
@"文件名.扩展名"
];