Re: Getting the free disk space and aquamon.
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.