fs

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MountUnmounter

type MountUnmounter interface {
	Mounter
	Unmounter
}

A MountUnmounter is the interface that mounts, and unmounts filesystems.

func NewLoggingMounter

func NewLoggingMounter(m Mounter, um Unmounter, logf func(string, ...interface{})) MountUnmounter

NewLoggingMounter returns a MountUnmounter that logs mount events using the given logger func.

type Mounter

type Mounter interface {
	Mount(source string, target string, fstype string, flags uintptr, data string) error
}

Mounter is the interface that mounts a filesystem. It's signature is the same as syscall.Mount.

type MounterFunc

type MounterFunc func(string, string, string, uintptr, string) error

MounterFunc is a functional type that implements Mounter. The mount syscall can be wrapped using MounterFunc(syscall.Mount) to be used as a Mounter.

func (MounterFunc) Mount

func (m MounterFunc) Mount(source string, target string, fstype string, flags uintptr, data string) error

type Unmounter

type Unmounter interface {
	Unmount(target string, flags int) error
}

Unmounter is the interface that unmounts a filesystem. It's signature is the same as syscall.Unmount.

type UnmounterFunc

type UnmounterFunc func(string, int) error

UnmounterFunc is a functional type that implements Unmounter. The unmount syscall can be wrapped using UnmounterFunc(syscall.Unmount) to be used as an Unmounter.

func (UnmounterFunc) Unmount

func (m UnmounterFunc) Unmount(target string, flags int) error

Jump to

Keyboard shortcuts

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