title: WriteToFile:atomically deprecate Warning
body: <p>I want write a textField value which is a user name to file named login.txt.</p>
  
  <p>My code:</p>
  
  <pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectory = [paths objectAtIndex:0];
  
  // the path to write file
  loginFilePath= [documentsDirectory stringByAppendingPathComponent:@"Login.txt"];
  NSString *userName=[nameText text];
  [userName writeToFile:loginFilePath atomically:YES];
  </code></pre>
  
  <p>I get Warning as "wrtieToFile:atomically:" is deprecated.</p>