Overwriting the previous file in NSDocumentDirectory
问题 I have used this code to write a string to the same file 10 times . But it is overwriting the previous data for every new launch. I want to append the new data to the old data . [@"one" writeToFile:[self returnDocumentsDirectory] atomically:NO encoding:NSASCIIStringEncoding error:nil]; -(NSString *)returnDocumentsDirectory { NSArray *DocumentsDirectoryPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *path = [DocumentsDirectoryPath objectAtIndex