Error while using getResourceValue:forKey method in NSURL
<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>

<p>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);</p>

<p>But i am getting following error:</p>

<p>Error Domain=NSPOSIXErrorDomain Code=17 "The operation couldn’t be completed. File exists"</p>

<p>Please assist.</p>
