Skip to main content

Cross-platform block device and mount point resolution from file paths

Project description

mount-resolve

PyPI version Python License OS

CI codecov

Cross-platform block device and mount point resolution from file paths.

Features

  • resolve_device — find the underlying block device for any file path (Linux /proc/partitions + /sys/dev/block, macOS hdiutil)
  • resolve_mount_point — find the mount point for any file path (Linux findmnt, macOS df)
  • resolve — combined call returning (device, mount_point, fstype)

Quick start

from mount_resolve import resolve, resolve_device, resolve_mount_point

# Combined — get device, mount point, and filesystem type in one call
info = resolve('/some/file')
# ('/dev/sda1', '/', 'ext4')

# Individual
device = resolve_device('/some/file')
mount = resolve_mount_point('/some/file')

License

GPL-3.0-only

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mount_resolve-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mount_resolve-0.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file mount_resolve-0.1.0.tar.gz.

File metadata

  • Download URL: mount_resolve-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mount_resolve-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83608477657edf8cbcbce661a83dd23a6bb204cf1f26491bef9fbf6d8ab52578
MD5 4df5dd5e59b04b5f7e75e5cc13fcde9d
BLAKE2b-256 9336dd1226229684e65f4f5d46232010fb66374fabeb9554004014778b7922e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mount_resolve-0.1.0.tar.gz:

Publisher: publish.yml on MBanucu/mount-resolve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mount_resolve-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mount_resolve-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mount_resolve-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44fcae7befff8f2b743664948336ee12fc9343c3ec44eb71df1271b826662764
MD5 1bda4f7891c7a377923b73f4e7096b2e
BLAKE2b-256 1d107c68a707e56b10b699d98adb2d3a66f0a9b81843faa22b7a5b0dd2dc1665

See more details on using hashes here.

Provenance

The following attestation bundles were made for mount_resolve-0.1.0-py3-none-any.whl:

Publisher: publish.yml on MBanucu/mount-resolve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page