Topic: iOS Objective a C Operation with files
Couple of days I can not solve a problem. It is required to save in a file a text line, then it from there to take, and a file or to delete or clear its contents. I tried NSFileHandle *file = [NSFileHandle fileHandleForUpdatingAtPath:@ "receipt.txt"]; But file always nil. I tried to write down in file NSData *savedata = [postDataFile dataUsingEncoding:NSUTF8StringEncoding]; [savedata writeToFile:@ "receipt.txt" atomically:YES]; and then to get NSString *str = [[NSString alloc] initWithContentsOfFile:@ "receipt.txt" encoding:NSUTF8StringEncoding error:NULL]; but str always nil. What do I do not so and how it is possible to solve a problem?