I need to delete the contents of a .txt
file and I don't know how to delete the full text.
The file is in my mainBundle
. I can access the file but I can't find the command to delete the text from inside it.
NSFileManager *filemgr;
filemgr = [NSFileManager defaultManager];
NSString* path = [[NSBundle mainBundle] pathForResource:@"UserData"
ofType:@"txt"];
NSString* content = [NSString stringWithContentsOfFile:path
encoding:NSUTF8StringEncoding
error:NULL];