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