|
@@ -139,7 +139,7 @@ int32_t const CHUNK_SIZE = 8 * 1024;
|
|
|
@param filePath 旧路径
|
|
|
@return 新路径
|
|
|
*/
|
|
|
-+ (NSString *)p_setupFileRename:(NSString *)filePath {
|
|
|
++ (nullable NSString *)p_setupFileRename:(NSString *)filePath {
|
|
|
|
|
|
NSString *lastPathComponent = [NSString new];
|
|
|
//获取文件名: 视频.MP4
|
|
@@ -153,13 +153,13 @@ int32_t const CHUNK_SIZE = 8 * 1024;
|
|
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
|
//通过移动该文件对文件重命名
|
|
|
BOOL isSuccess = [fileManager moveItemAtPath:filePath toPath:moveToPath error:nil];
|
|
|
- if (isSuccess) {
|
|
|
- NSLog(@"rename success");
|
|
|
- }else{
|
|
|
- NSLog(@"rename fail");
|
|
|
- }
|
|
|
+// if (isSuccess) {
|
|
|
+// NSLog(@"rename success");
|
|
|
+// }else{
|
|
|
+// NSLog(@"rename fail");
|
|
|
+// }
|
|
|
|
|
|
- return moveToPath;
|
|
|
+ return isSuccess ? moveToPath : nil;
|
|
|
}
|
|
|
|
|
|
/**
|