Re: How to get free bytes and total bytes for volumes
Re: How to get free bytes and total bytes for volumes
- Subject: Re: How to get free bytes and total bytes for volumes
- From: Jean-Daniel Dupas <email@hidden>
- Date: Fri, 4 Jan 2008 13:30:20 +0100
NSLog(@"Total volume size: %i bytes", [self
getVolumeTotalBytesForPath: @"/Users/marc/Desktop"]);
NSLog(@"Free volume size: %i bytes", [self
getVolumeFreeBytesForPath: @"/Users/marc/Desktop"]);
i get something like 3 free bytes and 18 total bytes using a path
on my PowerBook's harddrive which has 80GB total and 12GB free
space. In the documentation for FSVolumeInfo it says :
using an 'unsigned long long' is fine but to log an 'unsigned long
long' you have to use %llu and not %i
like this:
NSLog(@"Total volume size: %llu bytes", [self
getVolumeTotalBytesForPath: @"/Users/marc/Desktop"]);
NSLog(@"Free volume size: %llu bytes", [self
getVolumeFreeBytesForPath: @"/Users/marc/Desktop"]);
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden