Documentation ¶
Index ¶
- Constants
- func ForceMount(device, target, mType, options string) error
- func ForceUnmount(target string) (err error)
- func Mount(device, target, mType, options string) error
- func Mounted(mountpoint string) (bool, error)
- func TestParseFedoraMountinfo(t *testing.T)
- func TestParseGentooMountinfo(t *testing.T)
- func TestParseUbuntuMountinfo(t *testing.T)
- func Unmount(target string) error
- type MountInfo
Constants ¶
View Source
const ( RDONLY = syscall.MS_RDONLY NOSUID = syscall.MS_NOSUID NODEV = syscall.MS_NODEV NOEXEC = syscall.MS_NOEXEC SYNCHRONOUS = syscall.MS_SYNCHRONOUS DIRSYNC = syscall.MS_DIRSYNC REMOUNT = syscall.MS_REMOUNT MANDLOCK = syscall.MS_MANDLOCK NOATIME = syscall.MS_NOATIME NODIRATIME = syscall.MS_NODIRATIME BIND = syscall.MS_BIND RBIND = syscall.MS_BIND | syscall.MS_REC PRIVATE = syscall.MS_PRIVATE RELATIME = syscall.MS_RELATIME STRICTATIME = syscall.MS_STRICTATIME )
Variables ¶
This section is empty.
Functions ¶
func ForceMount ¶
Mount the specified options at the target path reguardless if the target is mounted or not Options must be specified as fstab style
func ForceUnmount ¶
Unmount the target reguardless if it is mounted or not
func Mount ¶
Mount the specified options at the target path only if the target is not mounted Options must be specified as fstab style
func Mounted ¶
Looks at /proc/self/mountinfo to determine of the specified mountpoint has been mounted
func TestParseFedoraMountinfo ¶ added in v1.1.0
func TestParseGentooMountinfo ¶ added in v1.1.0
func TestParseUbuntuMountinfo ¶ added in v1.1.0
Types ¶
Click to show internal directories.
Click to hide internal directories.