Re: getting free space available in a drive
Re: getting free space available in a drive
- Subject: Re: getting free space available in a drive
- From: Michael Watson <email@hidden>
- Date: Thu, 19 Jun 2008 03:29:26 -0400
There are two NSFileManager methods for this:
10.4.11 and earlier: -[NSFileManager fileSystemAttributesAtPath:]
10.5 and later: -[NSFileManager attributesOfFileSystemForPath:error:]
Each returns an NSDictionary containing a NSFileSystemFreeSize key.
The value for this key is an NSNumber that represents the number of
free bytes on the file system.
If you want to get gritty, use statfs() and multiply f_bfree (blocks
free) by f_bsize (block size for the file system).
--
m-s
On 19 Jun, 2008, at 02:44, Angelo Chen wrote:
Hi,
how to get the total free space available in a drive? thanks,
Angelo
_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息
給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk
_______________________________________________
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:
@bungie.org
This email sent to email@hidden
_______________________________________________
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