title: file exist but cannot open?
body: <p>Save Mechanics I have used:</p>
  
  <pre><code>    NSMutableData *data = [[NSMutableData alloc] init];
      NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
      [archiver encodeObject:self forKey:@"Save"];
      [archiver finishEncoding];
      [data writeToFile:filePath atomically:YES];
      [archiver release];
      [data release];
  </code></pre>
  
  <p>I have used</p>
  
  <pre><code>[[NSFileManager defaultManager] fileExistsAtPath:savePath];
  
  [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[SynchronizedData createPath] error:&amp;error]
  </code></pre>
  
  <p>to check the existences of my file. They confirm the file exist.</p>
  
  <p>However I cannot load the file with the same directory path</p>
  
  <pre><code>    //NSData *encodedData = [[NSFileManager defaultManager] contentsAtPath:[SynchronizedData createPath]];
  
      NSData *encodedData = [[[NSData alloc] initWithContentsOfFile:tempFilePath] autorelease];
  
      if (encodedData == nil) {
          NSLog(@"Save cannot open while loading!");
          return nil;
      }
  </code></pre>
  
  <p>The above encodedData, both returned nil. (autorelease is not the problem, i've checked)</p>
  
  <p>Any ideas what's wrong?</p>
  
  <p>I found similar case in <a href="https://stackoverflow.com/questions/1354007/error-while-checking-if-a-file-exists/1354049#1354049">previous thread</a>, I tried retain once more my tempFilePath, it doesn't matter, the problem still exist.</p>
  
  <hr>
  
  <p>I have done the save in a more simpler mechanism than the above one.</p>
  
  <p>The problem remained unsolved for getting the NSData from directory. Maybe due to Read Permission mentioned by @paxdiablo.</p>
  
  <p>Thus I use "Documents" folder instead of "Library". The NSData open has no error.</p>