Re: Size of a bundle (or directory)
Re: Size of a bundle (or directory)
- Subject: Re: Size of a bundle (or directory)
- From: Brian Ganninger <email@hidden>
- Date: Thu, 27 Mar 2003 13:05:34 -0600
NSFileManger is probably your best bet to get the information you're looking
for.
NSDictionary *dictionary = [[NSFileManager defaultManager]
fileAttributesAtPath:bundlePath traverseLink:NO];
NSNumber *bundleSize = [dictionary objectForKey:NSFileSize];
This is untested but should work or give a close stab at getting there.
Hope this helps.
- Brian Gannigner
On 3/27/03 12:34 PM, "Christopher Corbell" <email@hidden>
wrote:
>
Given an NSBundle (created with a known path), does anyone know
>
of an easy way to determine its total size?
>
>
I haven't been able to find this either in the NSBundle API or in
>
any POSIX api (total size of a directory's contents).
>
>
It's easy to Get Info for this information in the Finder, but I'd
>
like to be able to programatically get a number or, at least, a
>
line of text from the shell.
>
>
Thanks for any help,
>
Christopher
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
----
" An Apple a day keeps the PC away."
" Ever notice that Apples fall from the sky while computers get thrown out
Windows?"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.