There are a number of functions, system calls, and toolkit APIs for accessing file metadata. NSFileManager provides a path-based way to acquire metadata, as well as URL-based equivalents. The URL-based API actually exposes much more file metadata than the path-based one. Unfortunately, even though the URL-based metadata API is available on iOS, as of iOS 4.3, the methods return nil. So for iOS, you will need to stay with the path-based metadata API.
NSFileManager’s -attributesOfItemAtPath: returns a dictionary of attributes.
- (NSDictionary *) attributesOfItemAtPath: (NSString *) path error: (NSError **) error;
You can access these attributes through an NSDictionary category, of which a subset is shown below. ...