Version: v0.13.1 Latest Latest

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 11 Imported by: 0



package mount provides a simple abstraction around a mount point



This section is empty.


View Source
var ErrNotMounted = errors.New("not mounted")
View Source
var MountTimeout = time.Second * 5


func Closer added in v0.3.6

func Closer(m Mount) io.Closer

func ForceUnmount

func ForceUnmount(m Mount) error

ForceUnmount attempts to forcibly unmount a given mount. It does so by calling diskutil or fusermount directly.

func ForceUnmountManyTimes

func ForceUnmountManyTimes(m Mount, attempts int) error

ForceUnmountManyTimes attempts to forcibly unmount a given mount, many times. It does so by calling diskutil or fusermount directly. Attempts a given number of times.

func UnmountCmd added in v0.4.18

func UnmountCmd(point string) (*exec.Cmd, error)

UnmountCmd creates an exec.Cmd that is GOOS-specific for unmount a FUSE mount


type Mount

type Mount interface {
	// MountPoint is the path at which this mount is mounted
	MountPoint() string

	// Unmounts the mount
	Unmount() error

	// Checks if the mount is still active.
	IsActive() bool

	// Process returns the mount's Process to be able to link it
	// to other processes. Unmount upon closing.
	Process() goprocess.Process

Mount represents a filesystem mount

func NewMount

func NewMount(p goprocess.Process, fsys fs.FS, mountpoint string, allow_other bool) (Mount, error)

Mount mounts a fuse fs.FS at a given location, and returns a Mount instance. parent is a ContextGroup to bind the mount's ContextGroup to.

Source Files

Jump to

Keyboard shortcuts

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