title: iOS: How do you find the creation date of a file?
body: <p>I'm trying to find the creation date (NOT modification date) of a file.</p>
  
  <p>Creation date doesn't appear to be in the attributes of a file, though modified date is.</p>
  
  <p>I'm using this code..</p>
  
  <pre><code>NSFileManager* fm = [NSFileManager defaultManager];
  
  NSString* path = [PathHelpers pathInDocumentsFolderWithFilename:FILE_NAME];
  NSDictionary* attrs = [fm attributesOfItemAtPath:path error:nil];
  
  if (attrs != nil) {
      return (NSDate*)[attrs objectForKey: NSFileCreationDate];
  } else {
      return nil;
  }
  </code></pre>
  
  <p>This always returns nil.  Typing 'po attrs' into the debugger to get the list of key/value pairs in the NSDictionary returns the following..</p>
  
  <blockquote>
    <p>NSFileGroupOwnerAccountID = 20;<br />
    NSFileGroupOwnerAccountName = staff;<br />
    NSFileModificationDate = 2010-01-21 11:47:55 +0000;<br />
    NSFileOwnerAccountID = 501;<br />
    NSFileOwnerAccountName = ben;<br />
    NSFilePosixPermissions = 420;<br />
    NSFileReferenceCount = 1;<br />
    NSFileSize = 338;<br />
    NSFileSystemFileNumber = 2234;<br />
    NSFileSystemNumber = 42553324;<br />
    NSFileType = NSFileTypeRegular;</p>
  </blockquote>
  
  <p>No creation date.. bah..</p>
  
  <p>Anyone know another way of getting the creation date or does it just not exist in iOS?</p>