mountpoints

Crates.iomountpoints
lib.rsmountpoints
version0.2.1
sourcesrc
created_at2021-04-20 21:07:15.556112
updated_at2022-09-28 23:05:48.464121
descriptionList mount points (windows, linux, macos)
homepage
repositoryhttps://github.com/Speedy37/mountpoints-rs
max_upload_size
id387343
size31,445
Vincent Rouillé (Speedy37)

documentation

README

mountpoints - List mount points (windows, linux, macos)

Example

use mountpoints::mountpaths;

fn main() {
    for mountpath in mountpaths().unwrap() {
        println!("{}", mountpath.display());
    }
}

Windows output:

C:\
C:\MyLittleMountPoint
D:\

Linux output:

/mnt/wsl
/init
/dev
/dev/pts
/run
/run/lock
/run/shm
/run/user
/proc/sys/fs/binfmt_misc
/sys/fs/cgroup
/sys/fs/cgroup/unified
/mnt/c
/mnt/d

Macos output:

/
/dev
/System/Volumes/Data
/private/var/vm
/System/Volumes/Data/home
/Volumes/VMware Shared Folders
Commit count: 29

cargo fmt