mount

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CouldNotOpenFile

func CouldNotOpenFile(path string, err error) error

func IsFileSystemSupported

func IsFileSystemSupported(fsType string) (bool, error)

IsFileSystemSupported checks if given fs is supported by the running kernel

func SearchMountpoint

func SearchMountpoint(fstype string, search string) (string, error)

SearchMountpoint returns the last mountpoint for a given filesystem type containing a searchable string.

func UnmountedDirNotEmpty

func UnmountedDirNotEmpty(dir string) error

Types

type MountOnce

type MountOnce struct {
	// contains filtered or unexported fields
}

MountOnce will make sure a given source and filesystem type are mounted just once: it will check if given source and fs type are already mounted and, if not, it will mount it (in a temporary directory) and manage it (umounting at its destruction). If already mounted, the filesystem is left untouched at object's destruction.

func NewMountOnce

func NewMountOnce(source, fstype, data, where string) (*MountOnce, error)

func (*MountOnce) GetMountpoint

func (m *MountOnce) GetMountpoint() string

func (*MountOnce) IsMounted

func (m *MountOnce) IsMounted() bool

func (*MountOnce) Mount

func (m *MountOnce) Mount() error

func (*MountOnce) Umount

func (m *MountOnce) Umount() error

Jump to

Keyboard shortcuts

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