IOS把文件保存进沙盒目录
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:@"a.jpg"]]; // 保存文件的名称
BOOL result = [UIImagePNGRepresentation(original)writeToFile: filePath atomically:YES];
如果成功result为TRUE,filePath即为访问目录