• 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: Getting the free disk space and aquamon.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the free disk space and aquamon.


  • Subject: Re: Getting the free disk space and aquamon.
  • From: Buzz Andersen <email@hidden>
  • Date: Fri, 20 Dec 2002 14:47:16 -0700

Doh! I just realized that the example I gave in my my last message was for *total* disk space, not free space. Add this to the previous code to get the free space:

- (unsigned long long) getVolumeFreeBytesForPath: (NSString *) path {
[path retain];
int vRefNum = [self _getVolumeNumberForPath: path];
unsigned long long returnValue = 0;
OSErr osErr;

FSVolumeInfo info;
osErr = FSGetVolumeInfo (vRefNum, 0, NULL, kFSVolInfoSizes, &info, NULL, NULL);

if (osErr == noErr) {
returnValue = info.freeBytes;
}

[path release];
return returnValue;
}

--
Buzz Andersen
email: email@hidden
web: http://www.scifihifi.com
_______________________________________________
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.

References: 
 >Re: Getting the free disk space and aquamon. (From: Buzz Andersen <email@hidden>)

  • Prev by Date: Localization problems on UFS volumes
  • Next by Date: How to get fontManager:willIncludeFont: to work
  • Previous by thread: Re: Getting the free disk space and aquamon.
  • Next by thread: Re: OpenGL Examples broken in 10.2.3---where is OS X 10.2.3
  • Index(es):
    • Date
    • Thread