0
如何刪除文件刪除文件:從URL文件路徑///前綴:///前綴從URL路徑
NSLog(@"File downloaded to: %@", filePath);
目前,它打印爲:
file:///Users/Library/Developer/CoreSimulator/Devices/EF752245-9692-4607-B84C-6133202A846B/data/Containers/Data/Application/08686F05-C513-4BDF-A20C-EF3AE1201D54/Documents/2017-02-12_1476366438.zip
編輯:
我想我可以這樣做:
NSLog(@"File downloaded to: %@", [[filePath absoluteString] stringByReplacingOccurrencesOfString:@"file:///" withString:@""]);
但是沒有任何東西將它構建到可以刪除該前綴的NSString中?
是的,這樣做總的感覺。非常感謝,Rob。 –