title: Is there a more efficient way to append a log to a log file than this?
body: <p>I don't like what I have written here. The entire contents of the log file is pulled into memory, and I was wondering if there is a way to append to whatever is there, without pulling it out.</p>
  
  <pre><code>NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
  NSString *filePath = [documentsPath stringByAppendingPathComponent:@"Log"];
  NSMutableString *content = [@"" mutableCopy];
  NSMutableString *existing = [[NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil] mutableCopy];
  [content appendString:existing];
  [content appendString:@"\n"];
  [content appendString:[user logDetails]];
  [[content copy] writeToFile:filePath atomically:NO encoding:NSUTF8StringEncoding error:nil];
  </code></pre>