mount

package
v4.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mount

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

Mount is a helper that allows to emulate the behavior of mount in memory. Very usufull to create a temporal dir, on filesystem where is a performance penalty in doing so.

func New

func New(fs billy.Basic, mountpoint string, source billy.Basic) *Mount

New creates a new filesystem wrapping up 'fs' the intercepts all the calls made to `mountpoint` path and redirecting it to `source` filesystem.

func (*Mount) Capabilities

func (fs *Mount) Capabilities() billy.Capability

Capabilities implements the Capable interface.

func (*Mount) Create

func (h *Mount) Create(path string) (billy.File, error)

func (*Mount) Join

func (h *Mount) Join(elem ...string) string

func (*Mount) Lstat

func (h *Mount) Lstat(path string) (os.FileInfo, error)

func (*Mount) MkdirAll

func (h *Mount) MkdirAll(filename string, perm os.FileMode) error

func (*Mount) Open

func (h *Mount) Open(path string) (billy.File, error)

func (*Mount) OpenFile

func (h *Mount) OpenFile(path string, flag int, mode os.FileMode) (billy.File, error)

func (*Mount) ReadDir

func (h *Mount) ReadDir(path string) ([]os.FileInfo, error)
func (h *Mount) Readlink(link string) (string, error)

func (*Mount) Remove

func (h *Mount) Remove(path string) error

func (*Mount) Rename

func (h *Mount) Rename(from, to string) error

func (*Mount) Stat

func (h *Mount) Stat(path string) (os.FileInfo, error)
func (h *Mount) Symlink(target, link string) error

func (*Mount) Underlying

func (h *Mount) Underlying() billy.Basic

Jump to

Keyboard shortcuts

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