1

My application needs to know the free space on a APFS volume.

It seems the operating system can 'reserve' purgeable disk space, starting from macOS High Sierra and APFS.

When using NSFileManager function, it only returns 'real' free space:

NSDictionary* pathAttrs = [[NSFileManager defaultManager] fileSystemAttributesAtPath: path];
    NSNumber* pathSize = pathAttrs[ NSFileSystemSize];
    NSNumber* pathFreeSize = pathAttrs[ NSFileSystemFreeSize];

enter image description here

My question: how to compute or estimate this 'purgeable' free space?

Antoine Rosset
  • 1,045
  • 2
  • 13
  • 22
  • this should be local time machine snapshots, check if it is using the command `tmutil listlocalsnapshotdates` and see if it returns some listing. – Prado Aug 10 '19 at 00:04

0 Answers0