title: stop files from truncating objective C?
body: <p>I am trying to write some data to a file in iphone sdk....I am using a for statement to write to explain the situation better I have some code:</p>
  
  <pre><code>for(int i = 0;i &lt; 11;i++){
  
  NSString *myFile = [documentsDirectory stringByAppendingPathComponent:@"hello.txt"];
  [i writeToFile: myFile atomically:NO encoding:NSUTF8StringEncoding error:NULL];
  }
  </code></pre>
  
  <p>now I expect 12345678910 to written in the file but only 10 is written in it which means file is being trncated everytime I write to file..so my question is what  can I do to write 1 to 10 WITHOUT puttting everything in a string because I have alot of data..</p>
  
  <p>thanks</p>