• 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
Re: Obtaining the size of a directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining the size of a directory


  • Subject: Re: Obtaining the size of a directory
  • From: Jacob Chapa <email@hidden>
  • Date: Tue, 19 Oct 2004 09:38:30 -0500

the dictionary holds a lot more than that. take a look at NSFileManager


NSNumber *fsize;
NSDictionary *fattrs = [manager fileAttributesAtPath:@"/tmp/List" traverseLink:YES];

if (!fattrs) {
NSLog(@"Path is incorrect!");
return;
}

if (fsize = [fattrs objectForKey:NSFileSize])
NSLog(@"File size: %d\n", [fsize intValue]);

_______________________________________________
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
  • Prev by Date: Re: NSPopUpCell/NSTableView/Bindings via code
  • Next by Date: answering cocoa-dev questions
  • Previous by thread: Re: Obtaining the size of a directory
  • Next by thread: How do I remove a sub_class
  • Index(es):
    • Date
    • Thread