Does anyone know what Apple apis uses for this. Get the info panel to determine the free space in Lion? All the code I tried to get with the same available space reported by Apple fails, even Quick Look does not display the same space that is displayed in the Info view. This happens if I delete a bunch of files and try to read the available space.

When I use NSFileManager -> NSFileSystemFreeSize, I get 42918273024 bytes
When I use NSURL -> NSURLVolumeAvailableCapacityKey, I get 42918273024 bytes
When I use statfs -> buffer.f_bsize * buffer.f_bfree, I get 43180417024 bytes
statfs gets similar results for Quick Look, but how do I fit Get Info?
source
share