views:

288

answers:

1

I was planning on writing some code whose logic was based upon testing the creation date of a particular file in my app's Documents folder. Turns out, when I call -[NSFileManager attributesOfItemAtPath:error:], NSFileCreationDate isn't one of the provided attributes.

Is there no way to discover a file's creation date?

Thanks.

A: 

According to Apple's reference, NSFileCreationDate is available in 2.0+:

NSFileCreationDate The key in a file attribute dictionary whose value indicates the file's creation date.

The corresponding value is an NSDate object.

Available in iPhone OS 2.0 and later.

Declared in NSFileManager.h.

Shaggy Frog
I agree it's in the docs...but in practice, when you get file attributes and look all of them, it's not one of the provided attributes. (I'm away from my computer, otherwise I'd list them all here. There are 11; creation date isn't one of them.)
Greg Maletic
I should add that this is the case when I'm running on Simulator. I haven't tried it running on the actual phone. I can try that later tonight.
Greg Maletic