vfs

package
v0.0.0-...-389a847 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chmod

func Chmod(name string, mode os.FileMode) error

func Chown

func Chown(name string, uid, gid int) error

func Lchown

func Lchown(name string, uid, gid int) error
func Link(oldPath, newPath string) error

func Lstat

func Lstat(name string) (os.FileInfo, error)

func Mkdir

func Mkdir(name string, perm os.FileMode) error

func MkdirAll

func MkdirAll(name string, perm os.FileMode) error
func Readlink(name string) (string, error)

func Remove

func Remove(name string) error

func RemoveAll

func RemoveAll(path string) error

func Rename

func Rename(oldPath, newPath string) error

func Stat

func Stat(name string) (os.FileInfo, error)
func Symlink(oldPath, newPath string) error

func Truncate

func Truncate(name string, size int64) error

Types

type File

type File interface {
	io.Closer
	io.Reader
	io.ReaderAt
	io.Writer
	io.WriterAt
	io.Seeker
	Stat() (os.FileInfo, error)
	Sync() error
	Truncate(int64) error
	Readdir(int) ([]os.FileInfo, error)
	Readdirnames(int) ([]string, error)
}

func Create

func Create(name string) (File, error)

func Open

func Open(name string) (File, error)

func OpenFile

func OpenFile(name string, flag int, perm os.FileMode) (File, error)

type Filesystem

type Filesystem interface {
	Open(name string) (File, error)
	Create(name string) (File, error)
	OpenFile(name string, flag int, perm os.FileMode) (File, error)

	Stat(name string) (os.FileInfo, error)
	Lstat(name string) (os.FileInfo, error)

	Remove(name string) error
	RemoveAll(path string) error

	Rename(oldPath, newPath string) error

	Mkdir(name string, perm os.FileMode) error
	MkdirAll(name string, perm os.FileMode) error

	Link(oldPath, newPath string) error
	Symlink(oldPath, newPath string) error
	Readlink(name string) (string, error)

	Chmod(name string, mode os.FileMode) error
	Chown(name string, uid, gid int) error
	Lchown(name string, uid, gid int) error

	Truncate(name string, size int64) error

	Close() error
}
var Default Filesystem

Default filesystem. May be changed.

Defaults to RealRel(".").

func Real

func Real(path string) (Filesystem, error)

Creates a new Filesystem which access files under the given real path. The path is made absolute and so is not affected by future changes in working directory.

func RealRel

func RealRel(path string) (Filesystem, error)

Like Real, but does not absolutize the path, so the files accessed via the returned Filesystem will vary depending on the current working directory.

type Mounter

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

func (*Mounter) Chmod

func (r *Mounter) Chmod(name string, mode os.FileMode) error

func (*Mounter) Chown

func (r *Mounter) Chown(name string, uid, gid int) error

func (*Mounter) Close

func (r *Mounter) Close() error

func (*Mounter) Create

func (r *Mounter) Create(name string) (File, error)

func (*Mounter) Lchown

func (r *Mounter) Lchown(name string, uid, gid int) error
func (r *Mounter) Link(oldPath, newPath string) error

func (*Mounter) Lstat

func (r *Mounter) Lstat(name string) (os.FileInfo, error)

func (*Mounter) Mkdir

func (r *Mounter) Mkdir(name string, perm os.FileMode) error

func (*Mounter) MkdirAll

func (r *Mounter) MkdirAll(name string, perm os.FileMode) error

func (*Mounter) Mount

func (r *Mounter) Mount(mountPoint string, fs Filesystem) error

func (*Mounter) Open

func (r *Mounter) Open(name string) (File, error)

func (*Mounter) OpenFile

func (r *Mounter) OpenFile(name string, flag int, perm os.FileMode) (File, error)
func (r *Mounter) Readlink(name string) (string, error)

func (*Mounter) Remove

func (r *Mounter) Remove(name string) error

func (*Mounter) RemoveAll

func (r *Mounter) RemoveAll(name string) error

func (*Mounter) Rename

func (r *Mounter) Rename(oldPath, newPath string) error

func (*Mounter) Stat

func (r *Mounter) Stat(name string) (os.FileInfo, error)
func (r *Mounter) Symlink(oldPath, newPath string) error

func (*Mounter) Truncate

func (r *Mounter) Truncate(name string, size int64) error

func (*Mounter) Unmount

func (r *Mounter) Unmount(mountPoint string)

type Overlay

type Overlay struct {
	Overlay  Filesystem
	Underlay Filesystem
}

func (*Overlay) Chmod

func (r *Overlay) Chmod(name string, mode os.FileMode) error

func (*Overlay) Chown

func (r *Overlay) Chown(name string, uid, gid int) error

func (*Overlay) Close

func (r *Overlay) Close() error

func (*Overlay) Create

func (r *Overlay) Create(name string) (File, error)

func (*Overlay) Lchown

func (r *Overlay) Lchown(name string, uid, gid int) error
func (r *Overlay) Link(oldPath, newPath string) error

func (*Overlay) Lstat

func (r *Overlay) Lstat(name string) (os.FileInfo, error)

func (*Overlay) Mkdir

func (r *Overlay) Mkdir(name string, perm os.FileMode) error

func (*Overlay) MkdirAll

func (r *Overlay) MkdirAll(name string, perm os.FileMode) error

func (*Overlay) Open

func (r *Overlay) Open(name string) (File, error)

func (*Overlay) OpenFile

func (r *Overlay) OpenFile(name string, flag int, perm os.FileMode) (File, error)
func (r *Overlay) Readlink(name string) (string, error)

func (*Overlay) Remove

func (r *Overlay) Remove(name string) error

func (*Overlay) RemoveAll

func (r *Overlay) RemoveAll(name string) error

func (*Overlay) Rename

func (r *Overlay) Rename(oldPath, newPath string) error

func (*Overlay) Stat

func (r *Overlay) Stat(name string) (os.FileInfo, error)
func (r *Overlay) Symlink(oldPath, newPath string) error

func (*Overlay) Truncate

func (r *Overlay) Truncate(name string, size int64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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