Re: NSFileSystemSize
Re: NSFileSystemSize
- Subject: Re: NSFileSystemSize
- From: Michael Stone <email@hidden>
- Date: Thu, 23 Aug 2001 11:34:53 -0600
On 8/23/01 9:08 AM, John C. Randolph at email@hidden wrote:
>
On Thursday, August 23, 2001, at 07:47 AM, Michael Stone wrote:
>
>
> On 8/23/01 12:04 AM, John C. Randolph at email@hidden wrote:
>
>
>
>> On Wednesday, August 22, 2001, at 09:01 PM, Michael Stone wrote:
>
>>
>
>>> On 8/22/01 9:45 PM, John C. Randolph at email@hidden wrote:
>
>>>
>
>>>> On Wednesday, August 22, 2001, at 08:35 PM, Michael Stone wrote:
>
>>>>
>
>>>>> I'm using fileSystemAttributesAtPath:NSHomeDirectory() to get the
>
>>>>> total
>
>>>>> disk
>
>>>>> space via NSFileSystemSize, but it's returning 788MB when I really
>
>>>>> have
>
>>>>> 4700MB. NSFileSystemFreeSize returns a correct value of 2878MB. Does
>
>>>>> anyone
>
>>>>> know why NSFileSystemSize is returning an incorrect value?
>
>>>>
>
>>>> Isn't NSFileSystemSize supposed to say how much space the filesystem
>
>>>> has
>
>>>> *used*?
>
>>>
>
>>> If that's the case, it should be returning 2103MB for my system.
>
>>> Instead, it
>
>>> returns 788MB.
>
>>
>
>> I believe it's supposed to report the space taken by the tree starting
>
>> at the given path. You should get the answer of 2103MB if you called
>
>> fileSystemAttributesAtPath:@"/".
>
>
>
> I would have thought that, too, but it still gives me 788MB. Are you
>
> seeing
>
> this problem on your system? Has anyone else seen this problem?
>
>
Is it possible that there's another consumer of space on this disk that
>
isn't accounted for? How much do your /tmp and /private/vm directories
>
account for? Maybe mmap()'d files are involved?
I'm grabbing from the Finder's Get Info window the figures I think I should
be getting from the code. Shouldn't they be the same? It's also suspicious
that free disk space is reported correctly and is much larger than total
disk space. If there were something else consuming space, I would expect
both figures to reflect it, right?