title: check if a file exists objective-c
body: <p>I used the codes below to check if a file exists</p>
  
  <pre><code>bool b=[[NSFileManager defaultManager] fileExistsAtPath:filePath];
  </code></pre>
  
  <p>The codes worked on IOS.</p>
  
  <p>But When I migrate it to mac os x,</p>
  
  <p>But I found whether the file exists on disk with filePath, 
  b always returns 0, which means the file does not exists.</p>
  
  <p>I wonder if there is difference between ios and macosx</p>
  
  <p>Welcome any comment</p>