NSString *path = [[@"~" stringByExpandingTildeInPath] stringByAppendingString: @"/tmp.txt"];
[path writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:nil];
NSString *path = [[@"~" stringByExpandingTildeInPath] stringByAppendingString: @"/tmp.txt"];
[path writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:nil];
转载于:https://www.cnblogs.com/ficow/p/5040825.html