title: Error while using getResourceValue:forKey method in NSURL
body: <p>I am trying to fetch the file size attribute from a NSURL object by passing it getResourceValue:forKey method. Here is the code i am writing:</p>
  
  <pre><code>NSURL *samplePath = [[NSURL alloc] initWithString:@"file://localhost/Users/Abhinav/Test/abhi.pdf"];
  [samplePath getResourceValue:&amp;name forKey:NSURLFileSizeKey error:&amp;error];
  NSLog(@"Error===%@",error);
  NSLog(@"name===%@",name);
  </code></pre>
  
  <p>But i am getting following error:</p>
  
  <pre><code>Error Domain=NSPOSIXErrorDomain Code=17 "The operation couldn’t be completed. File exists"
  </code></pre>
  
  <p>Please assist.</p>