mount

package
v0.0.0-...-ef54517 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

borrowed from tracee

borrowed from tracee

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 SearchMountpointFromHost

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

SearchMountpointFromHost returns the last mountpoint for a given filesystem type containing a searchable string. It confirms the mount originates from the root file system.

func UnmountedDirNotEmpty

func UnmountedDirNotEmpty(dir string) error

Types

type MountHostOnce

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

MountHostOnce 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 given from the host filesystem, 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 NewMountHostOnce

func NewMountHostOnce(source, fstype, data, where string) (*MountHostOnce, error)

func (*MountHostOnce) GetMountpoint

func (m *MountHostOnce) GetMountpoint() string

func (*MountHostOnce) IsMounted

func (m *MountHostOnce) IsMounted() bool

func (*MountHostOnce) Mount

func (m *MountHostOnce) Mount() error

func (*MountHostOnce) Umount

func (m *MountHostOnce) Umount() error

Jump to

Keyboard shortcuts

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