Versions in this module Expand all Collapse all v1 v1.16.3 Oct 23, 2019 Changes in this version + const FakeActionMount + const FakeActionUnmount + func AddSystemdScope(systemdRunPath, mountName, command string, args []string) (string, []string) — linux/amd64 + func CleanupMountPoint(mountPath string, mounter Interface, extensiveMountPointCheck bool) error + func GetDeviceNameFromMount(mounter Interface, mountPath string) (string, int, error) + func IsCorruptedMnt(err error) bool + func IsNotMountPoint(mounter Interface, file string) (bool, error) + func MakeBindOpts(options []string) (bool, []string, []string) + func MakeMountArgs(source, target, fstype string, options []string) []string — linux/amd64 + func NormalizeWindowsPath(path string) string — windows/amd64 + func PathExists(path string) (bool, error) + func PathWithinBase(fullPath, basePath string) bool + func SearchMountPoints(hostSource, mountInfoPath string) ([]string, error) — linux/amd64 + func StartsWithBackstep(rel string) bool + func ValidateDiskNumber(disk string) error — windows/amd64 + type Exec interface + Run func(cmd string, args ...string) ([]byte, error) + func NewOSExec() Exec + type FakeAction struct + Action string + FSType string + Source string + Target string + type FakeExec struct + func NewFakeExec(run runHook) *FakeExec + func (f *FakeExec) Run(cmd string, args ...string) ([]byte, error) + type FakeMounter struct + Log []FakeAction + MountCheckErrors map[string]error + MountPoints []MountPoint + func (f *FakeMounter) GetMountRefs(pathname string) ([]string, error) + func (f *FakeMounter) IsLikelyNotMountPoint(file string) (bool, error) + func (f *FakeMounter) List() ([]MountPoint, error) + func (f *FakeMounter) Mount(source string, target string, fstype string, options []string) error + func (f *FakeMounter) ResetLog() + func (f *FakeMounter) Unmount(target string) error + type Interface interface + GetMountRefs func(pathname string) ([]string, error) + IsLikelyNotMountPoint func(file string) (bool, error) + List func() ([]MountPoint, error) + Mount func(source string, target string, fstype string, options []string) error + Unmount func(target string) error + func New(mounterPath string) Interface + type MountInfo struct — darwin/amd64, js/wasm, linux/amd64 + FsType string + ID int + MajorMinor string + MountOptions []string + MountPoint string + OptionalFields []string + ParentID int + Root string + Source string + SuperOptions []string + func ParseMountInfo(filename string) ([]MountInfo, error) + type MountPoint struct + Device string + Freq int + Opts []string + Pass int + Path string + Type string + func ListProcMounts(mountFilePath string) ([]MountPoint, error) + type Mounter struct + func (*Mounter) List() ([]MountPoint, error) + func (mounter *Mounter) GetMountRefs(pathname string) ([]string, error) + func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) + func (mounter *Mounter) List() ([]MountPoint, error) + func (mounter *Mounter) Mount(source string, target string, fstype string, options []string) error + func (mounter *Mounter) Unmount(target string) error + type SafeFormatAndMount struct + func (mounter *SafeFormatAndMount) FormatAndMount(source string, target string, fstype string, options []string) error + func (mounter *SafeFormatAndMount) GetDiskFormat(disk string) (string, error)