Get information about the mounted file systems.
- list the mounted file system
- support Linux
- support MacOS/BSD
- support Windows
- command line tools (fstab)
$ go get github.com/flier/mountedfstab, err := mounted.FileSystems()
if err != nil {
fmt.Printf("fail to get mounted file systems, %s", err)
os.Exit(-1)
}
for _, fs := range fstab {
fmt.Printf("%s\n", fs)
}$ go get github.com/flier/mounted/cmd/fstab
$ fstab
...
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
...