• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSFileManager and fileAttributesAtPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSFileManager and fileAttributesAtPath
      • From: j o a r <email@hidden>
  • Prev by Date: Re: multiple documents, single window
  • Next by Date: Re: NSFileManager and fileAttributesAtPath
  • Previous by thread: Re: NSImageView PICTRepresentation?
  • Next by thread: Re: NSFileManager and fileAttributesAtPath
  • Index(es):
    • Date
    • Thread