Re: Detecting low disk space
Re: Detecting low disk space
- Subject: Re: Detecting low disk space
- From: Fritz Anderson <email@hidden>
- Date: Fri, 9 Apr 2004 10:48:19 -0500
NSDictionary * dict = [[NSFileManager defaultManager]
fileSystemAttributesAtPath: @"/"];
unsigned freeSpace = [[dict objectForKey: NSFileSystemFreeSize]
unsignedIntValue];
This will give you the free disk space on the startup volume. I can't
vouch for whether it is wise (or possible) to take up all the free
space.
-- F
On 9 Apr 2004, at 5:03 AM, Peter wrote:
I have an app which sometimes generate a very large files and hits a
write error when the disk space is low at start up hard disk. It is
hard to tell whether the disk space is enough, although sometimes it
display as certain of megabytes left in free disk space but it is not
enough for my app. My guess is the OS X's virtual memory is also taken
up part of the disk space but not displayed.
My question is there a way to detect low disk space or 'true' disk
space left ?
_______________________________________________
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.