mount

package
v0.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MountCmdName                        = "mount"
	UMountCmdName                       = "umount"
	MountPointCmdName                   = "mountpoint"
	IsNotMountPoint                     = "is not a mountpoint"
	IsNotMountPointZhCN                 = "不是一个挂载点"
	ErrEndpointNotConnected             = "transport endpoint is not connected"
	TransportEndpointIsNotConnected     = "Transport endpoint is not connected"
	SocketNotConnected                  = "Socket not connected"
	TransportEndpointIsNotConnectedZhCN = "传输端点尚未连接"
	DirectoryNotEmpty                   = "directory not empty"
	DirectoryNotEmptyZhCN               = "目录非空"
	NotMounted                          = "not mounted"

	CmdTimeoutEnv            = "CMD_TIMEOUT_IN_SECOND"
	DefaultCmdTimoutInSecond = 60
	KillPGroupCmd            = "kill -9 -%d"
)

Variables

This section is empty.

Functions

func CleanUpMountPoint

func CleanUpMountPoint(path string) error

func CleanUpMountPoints

func CleanUpMountPoints(paths []string) error

func ExecCmdWithTimeout

func ExecCmdWithTimeout(name string, args []string) ([]byte, error)

func ExecMount

func ExecMount(sourcePath, targetPath string, args []string) ([]byte, error)

func ExecMountBind

func ExecMountBind(sourcePath, targetPath string, ReadOnly bool) ([]byte, error)

func ForceUnmount

func ForceUnmount(path string) error

func ForceUnmountAndRemove

func ForceUnmountAndRemove(path string) error

func GetCmdTimeout

func GetCmdTimeout() time.Duration

func GetFileInode

func GetFileInode(path string) (uint64, error)

func IsLikelyMountPoint

func IsLikelyMountPoint(path string) (bool, error)

func IsMountPoint

func IsMountPoint(path string) (bool, error)

func ManualUnmount

func ManualUnmount(path string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL