mount

package
v0.0.0-...-7fe9760 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

包装入提供了围绕装入点的简单抽象

Index

Constants

This section is empty.

Variables

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

Functions

func Closer

func Closer(m Mount) io.Closer

func ForceUnmount

func ForceUnmount(m Mount) error

forceUnmount尝试强制卸载给定的装载。 它通过直接调用diskutil或fusermount来实现。

func ForceUnmountManyTimes

func ForceUnmountManyTimes(m Mount, attempts int) error

强制卸载每次尝试强制卸载给定的装载, 很多次。它通过直接调用diskutil或fusermount来实现。 尝试给定次数。

func UnmountCmd

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

unmountcmd创建一个特定于goos的exec.cmd 用于拆卸保险丝座

Types

type Mount

type Mount interface {
	//mountpoint是安装此装载的路径
	MountPoint() string

	//卸载装载
	Unmount() error

	//检查安装是否仍处于活动状态。
	IsActive() bool

	//进程返回mount的进程,以便能够将其链接
	//其他流程。关闭时卸载。
	Process() goprocess.Process
}

mount表示文件系统装载

func NewMount

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

mount在给定位置安装fuse fs.fs,并返回mount实例。 父级是要将装入的ContextGroup绑定到的ContextGroup。

Jump to

Keyboard shortcuts

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