title: NSFileManager not deleting a file that exists
body: <p>I am having some problem with using the NSFileManager functionalities.
  This happens both on the Simulator and an iPhone device (iOS 5.1).</p>
  
  <p>Basically, I have a bunch of files that are stored in a document that I created. Now I am trying to move a file (stored at path) to the same directory with another name, to check if the deletion works.</p>
  
  <pre><code>if ([[NSFileManager defaultManager] isDeletableFileAtPath:path]) {
  BOOL success = [[NSFileManager defaultManager] moveItemAtPath:path toPath:[path            stringByAppendingString:@".deleted"] error:&amp;error];
  if (!success) {
          NSLog(@"Error removing file at path: %@", error.localizedDescription);
      }
  }
  </code></pre>
  
  <p>The output of this is both files at <em>path</em> and <em>path</em>.deleted.
  I ultimately just want to remove the file using <em>removeItemAtPath</em> but that is not working. It returns a success but if I see it in the file directory I can still see it there even after an hour.</p>