• 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: Cocoa-dev Digest, Vol 1, Issue 162
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 1, Issue 162


  • Subject: Re: Cocoa-dev Digest, Vol 1, Issue 162
  • From: Dominik Freyer <email@hidden>
  • Date: Tue, 19 Oct 2004 23:27:23 +0200




I tested your code, but I'm not sure if I know what you're trying to tell me. It still gives me the wrong size.



Von: Jacob Chapa <email@hidden>
Datum: 19. Oktober 2004 16:38:30 MESZ
An: email@hidden
Betreff: Re: Obtaining the size of a directory


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: Binding nested objects
  • Next by Date: Custom view and framework bug
  • Previous by thread: Re: Cocoa-dev Digest, Vol 1, Issue 162
  • Next by thread: Predicting the fate on an Unarchive operation
  • Index(es):
    • Date
    • Thread