• 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: How to get free bytes and total bytes for volumes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to get free bytes and total bytes for volumes (From: Marc Lohse <email@hidden>)

  • Prev by Date: Re: Correctly Subclassing NSTableHeaderCell?
  • Next by Date: Re: Bindings and object-pointer keys
  • Previous by thread: How to get free bytes and total bytes for volumes
  • Next by thread: Re: Bindings and object-pointer keys
  • Index(es):
    • Date
    • Thread