4 releases

0.2.1 Sep 28, 2022
0.2.0 Sep 28, 2022
0.1.1 May 21, 2022
0.1.0 Apr 20, 2021

#1073 in Filesystem

Download history 61/week @ 2024-09-11 153/week @ 2024-09-18 74/week @ 2024-09-25 27/week @ 2024-10-02 19/week @ 2024-10-09 18/week @ 2024-10-16 17/week @ 2024-10-23 20/week @ 2024-10-30 11/week @ 2024-11-06 3/week @ 2024-11-13 14/week @ 2024-11-20 46/week @ 2024-11-27 32/week @ 2024-12-04 59/week @ 2024-12-11 30/week @ 2024-12-18 8/week @ 2024-12-25

136 downloads per month
Used in 5 crates (3 directly)

MIT/Apache

19KB
423 lines

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

lib.rs:

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

Dependencies

~215KB