mount – github.com/moby/sys/mount Index | Files

package mount

import "github.com/moby/sys/mount"

Index

Constants

const (
	BIND        = 0
	DIRSYNC     = 0
	MANDLOCK    = 0
	NOATIME     = 0
	NODEV       = 0
	NODIRATIME  = 0
	NOEXEC      = 0
	NOSUID      = 0
	UNBINDABLE  = 0
	RUNBINDABLE = 0
	PRIVATE     = 0
	RPRIVATE    = 0
	SHARED      = 0
	RSHARED     = 0
	SLAVE       = 0
	RSLAVE      = 0
	RBIND       = 0
	RELATIME    = 0
	REMOUNT     = 0
	STRICTATIME = 0
	SYNCHRONOUS = 0
	RDONLY      = 0
)

These flags are unsupported.

Functions

func MergeTmpfsOptions

func MergeTmpfsOptions(options []string) ([]string, error)

MergeTmpfsOptions merge mount options to make sure there is no duplicate.

func Mount

func Mount(device, target, mType, options string) error

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

func RecursiveUnmount(target string) error

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

func Unmount(target string) error

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

flags.go flags_unsupported.go mount.go mount_errors.go mounter_unsupported.go unmount_unix.go

Version
v0.1.1
Published
Sep 15, 2020
Platform
darwin/amd64
Imports
6 packages
Last checked
2 weeks ago

Tools for package owners.