package mount
import "github.com/moby/sys/mount"
Package mount provides a set of functions to mount and unmount mounts.
Currently it supports Linux. For historical reasons, there is also some support for FreeBSD.
Index ¶
- func MergeTmpfsOptions(options []string) ([]string, error)
- func Mount(device, target, mType, options string) error
- func RecursiveUnmount(target string) error
- func Unmount(target string) error
Functions ¶
func MergeTmpfsOptions ¶
MergeTmpfsOptions merge mount options to make sure there is no duplicate.
func Mount ¶
Mount will mount filesystem according to the specified configuration. Options must be specified like the mount or fstab unix commands: "opt1=val1,opt2=val2". See flags.go for supported option flags.
func RecursiveUnmount ¶
RecursiveUnmount unmounts the target and all mounts underneath, starting with the deepest mount first. The argument does not have to be a mount point itself.
func Unmount ¶
Unmount lazily unmounts a filesystem on supported platforms, otherwise does a normal unmount. If target is not a mount point, no error is returned.
Source Files ¶
doc.go flags_unix.go mount_errors.go mount_unix.go mounter_unsupported.go
- Version
- v0.3.4 (latest)
- Published
- Jul 17, 2024
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- now –
Tools for package owners.