NSFileManager and fileAttributesAtPath
NSFileManager and fileAttributesAtPath
- Subject: NSFileManager and fileAttributesAtPath
- From: Nick Morris <email@hidden>
- Date: Fri, 8 Oct 2004 12:10:32 +0100
Hi,
I was wondering if anyone on this list could answer the following?
(This question comes from my lack of understanding of the underlying
file system and how it works.)
When fileAttributesAtPath, which is part of NSFileManager, is called is
the program/system loading the full file, part of the file, or querying
some sort of system database?
I have looked online, and in the documentation, and can't find an
answer.
A code snippet that shows what I am trying to do....
NSFileManager *fileManager = [NSFileManager defaultManager];
NSDictionary *theFileAttributeDictionary = [NSDictionary
dictionaryWithDictionary:[fileManager fileAttributesAtPath:@"text.txt"
traverseLink:NO]];
NSDate *fileCreationDate = [theFileAttributeDictionary
objectForKey:NSFileCreationDate];
NSDate *fileModificationDate] = [theFileAttributeDictionary
objectForKey:NSFileModificationDate];
The reason I ask is I was wondering if using the above code was better,
or equal, to doing a checksum in terms of disk access/RAM usage, i.e.
if fileAttributesAtPath is loading the file into RAM I may as well just
do a checksum.
Thanks
Nick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden