iOS拼接沙盒路径
2016-03-28 本文已影响571人
JasonEVA
/** 拼接沙盒全路径 拼接Documents以后的相对路径
*/
- (NSString *)getAllPathWithRelativePath:(NSString *)relativePath
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *strResult = [paths objectAtIndex:0];
strResult = [strResult stringByAppendingPathComponent:relativePath];
return strResult;
}