Give me a path, I'll tell you the filesystem it's on
Works on Windows, Linux, and macOS
Warning
This library only supports some popular filesystems (see here)
As a library:
let path = Path::new("/Volumes/My Volume/My Folder");
let fs_kind = which_fs::FsKind::try_from_path(path).unwrap();
println!("{} is on a {} filesystem", path.display(), fs_kind);As a cli:
% which-fs .
Filesystem: APFS