Documentation
¶
Index ¶
- type Mounter
- func (*Mounter) DeviceOpened(pathname string) (bool, error)
- func (*Mounter) EvalHostSymlinks(pathname string) (string, error)
- func (*Mounter) ExistsPath(pathname string) (bool, error)
- func (*Mounter) GetDeviceNameFromMount(mountPath, pluginMountDir string) (string, error)
- func (*Mounter) GetFSGroup(pathname string) (int64, error)
- func (*Mounter) GetFileType(_ string) (mount.FileType, error)
- func (*Mounter) GetMode(pathname string) (os.FileMode, error)
- func (*Mounter) GetMountRefs(pathname string) ([]string, error)
- func (*Mounter) GetSELinuxSupport(pathname string) (bool, error)
- func (*Mounter) IsLikelyNotMountPoint(file string) (bool, error)
- func (*Mounter) IsMountPointMatch(mp mount.MountPoint, dir string) bool
- func (*Mounter) List() ([]mount.MountPoint, error)
- func (*Mounter) MakeDir(pathname string) error
- func (*Mounter) MakeFile(pathname string) error
- func (*Mounter) MakeRShared(path string) error
- func (*Mounter) Mount(source string, target string, fstype string, options []string) error
- func (*Mounter) PathIsDevice(pathname string) (bool, error)
- func (*Mounter) Unmount(target string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mounter ¶
type Mounter struct{}
Mounter provides the mount.Interface implementation for unsupported platforms.
func NewMounter ¶
NewMounter returns a new Mounter for the current system
func (*Mounter) DeviceOpened ¶
DeviceOpened checks if block device in use. I tis a noop for unsupported systems
func (*Mounter) EvalHostSymlinks ¶
EvalHostSymlinks returns the path name after evaluating symlinks. Always returns an error on unsupported platforms
func (*Mounter) ExistsPath ¶
ExistsPath checks if pathname exists. Always returns an error on unsupported platforms
func (*Mounter) GetDeviceNameFromMount ¶
GetDeviceNameFromMount finds the device name from its global mount point using the given mountpath and plugin location. It is a noop of unsupported platforms
func (*Mounter) GetFSGroup ¶
GetFSGroup returns FSGroup of pathname. Always returns an error on unsupported platforms
func (*Mounter) GetFileType ¶
GetFileType checks for file/directory/socket/block/character devices. Always returns an error and "fake" filetype on unsupported platforms
func (*Mounter) GetMode ¶
GetMode returns permissions of pathname. Always returns an error on unsupported platforms
func (*Mounter) GetMountRefs ¶
GetMountRefs finds all mount references to the path, returns a list of paths. Always returns an error on unsupported platforms
func (*Mounter) GetSELinuxSupport ¶
GetSELinuxSupport tests if pathname is on a mount that supports SELinux. Always returns an error on unsupported platforms
func (*Mounter) IsLikelyNotMountPoint ¶
IsLikelyNotMountPoint determines if a directory is not a mountpoint. It is a noop on unsupported systems
func (*Mounter) IsMountPointMatch ¶
func (*Mounter) IsMountPointMatch(mp mount.MountPoint, dir string) bool
IsMountPointMatch tests if dir and mp are the same path
func (*Mounter) List ¶
func (*Mounter) List() ([]mount.MountPoint, error)
List returns a list of all mounted filesystems. It is a noop for unsupported systems
func (*Mounter) MakeRShared ¶
MakeRShared checks if path is shared and bind-mounts it as rshared if needed. It is a noop on unsupported platforms
func (*Mounter) PathIsDevice ¶
PathIsDevice checks if pathname refers to a device. It is a noop for unsupported systems