试试这个方法:
NSError *error;
NSDictionary* attributes = [[NSFileManager defaultManager]
attributesOfItemAtPath: filePath
error: &error];
然后您可以查询[attributes fileCreationDate]
或[attributes fileSize]
。参见 NSFileManager.h 的NSFileAttributes
类别NSDictionary
。