Search This Blog

Tuesday, March 11, 2014

File Appening

 //append text to file (you'll probably want to add a newline every write)
      NSFileHandle *file = [NSFileHandle fileHandleForUpdatingAtPath:filePath];
      [file seekToEndOfFile];
      [file writeData:[content dataUsingEncoding:NSUTF8StringEncoding]];
      [file closeFile];

No comments:

Post a Comment