Skip to content

List mount points (windows, linux, macos)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

Speedy37/mountpoints-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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