mount

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

FS is mesh of several file systems mounted at different paths. Mount a file system with AddMount().

For ease of use, call the standard operations via hackpadfs.OpenFile(fs, ...), hackpadfs.Mkdir(fs, ...), etc.

func NewFS

func NewFS(rootFS hackpadfs.FS) (*FS, error)

NewFS returns a new FS.

func (*FS) AddMount

func (fs *FS) AddMount(path string, mount hackpadfs.FS) error

AddMount mounts 'mount' at 'path'. The mount point must already exist as a directory.

func (*FS) Mount

func (fs *FS) Mount(path string) (mount hackpadfs.FS, subPath string)

Mount implements hackpadfs.MountFS

func (*FS) MountPoints

func (fs *FS) MountPoints() []Point

MountPoints returns a slice of mount points every mounted file system.

func (*FS) Open

func (fs *FS) Open(name string) (hackpadfs.File, error)

Open implements hackpadfs.FS

func (*FS) Rename

func (fs *FS) Rename(oldname, newname string) error

Rename implements hackpadfs.RenameFS

type Point

type Point struct {
	Path string
}

Point represents a mount point, including any relevant metadata

Jump to

Keyboard shortcuts

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