Get the mount point path for an arbitrary file or directory path.
This is a lightweight alternative to getVolumeMetadataForPath when
you only need the mount point string. On macOS it uses a single fstatfs()
call (no DiskArbitration, IOKit, or space calculations). On Linux/Windows
it uses device ID matching against the mount table.
Symlinks are resolved, and macOS APFS firmlinks (e.g. /Users →
/System/Volumes/Data) are handled correctly.
Get the mount point path for an arbitrary file or directory path.
This is a lightweight alternative to getVolumeMetadataForPath when you only need the mount point string. On macOS it uses a single fstatfs() call (no DiskArbitration, IOKit, or space calculations). On Linux/Windows it uses device ID matching against the mount table.
Symlinks are resolved, and macOS APFS firmlinks (e.g.
/Users→/System/Volumes/Data) are handled correctly.