NSString *Path = @"~/NSData.txt"; NSLog(@"Extension:%@",[Path pathExtension]); 转载于:https://www.cnblogs.com/zhaozhongpeng/p/4867887.html