@photostructure/fs-metadata
    Preparing search index...

    Function getMountPointForPath

    • 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.

      Parameters

      • pathname: string

        Path to any file or directory

      • Optionalopts: Partial<Pick<Options, "timeoutMs" | "mountPoints" | "linuxMountTablePaths">>

        Optional settings (timeoutMs, linuxMountTablePaths)

      Returns Promise<string>

      The mount point path (e.g., "/", "/System/Volumes/Data", "C:\")