title: Write NSData to a file?
body: <p>I am trying to write an nsdata to a file on my disk, I have the following code and it doesn't work, am i doing anything wrong?</p>
  
  <pre><code>Boolean result = [data writeToFile:@"/Users/aryaxt/Desktop/test2.avi" atomically:YES];
  </code></pre>
  
  <p>test2.avi doesn't exist, I am assuming that writeToFile would create it for me</p>