- (void)file_opeation {
NSString *filePath = @"/Users/apple/Desktop/测试1.docx";
NSLog(@"---获取路径中文件完整的文件名(带后缀)---%@", [filePath lastPathComponent]);
// ---获取路径中文件完整的文件名(带后缀)---测试1.docx
NSLog(@"-----获取文件路径-----%@", [filePath stringByDeletingLastPathComponent]);
// -----获取文件路径-----/Users/apple/Desktop
NSLog(@"------获取文件名(不带后缀)------%@", [filePath stringByDeletingPathExtension]);
// ------获取文件名(不带后缀)------/Users/apple/Desktop/测试1
NSLog(@"------获取文件后缀名(不带.)----%@", [filePath pathExtension]);
// ------获取文件后缀名(不带.)----docx
}