Re: Calculating volume free space
Re: Calculating volume free space
- Subject: Re: Calculating volume free space
- From: Dan Bernstein <email@hidden>
- Date: Mon, 6 Feb 2006 11:54:31 +0200
> Is there another API I should be using besides statfs? I couldn't find
> anything appropriate in NSWorkspace or NSFileManager.
NSString *pathOnVolume = @"/"; // any path on the volume will do
NSDictionary *attributes = [[NSFileManager defaultManager]
fileSystemAttributesAtPath:pathOnVolume];
UInt64 availableBytes = [[attributes
objectForKey:NSFileSystemFreeSize] unsignedLongLongValue];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden