virtualfs

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExtraInfo

func GetExtraInfo(fi os.FileInfo) (uid, gid int, aTime, mTime time.Time)

func NewVirtualFS

func NewVirtualFS(zipFile string) (afero.Fs, error)

NewVirtualFS initalized the tree, which creates the root directory

Types

type File

type File struct {
	os.FileInfo

	SymLink string
	// contains filtered or unexported fields
}

func (*File) Close

func (f *File) Close() (err error)

func (*File) Read

func (f *File) Read(p []byte) (n int, err error)

func (*File) ReadAt

func (f *File) ReadAt(p []byte, off int64) (n int, err error)

func (*File) Readdir

func (f *File) Readdir(n int) ([]os.FileInfo, error)

func (*File) Readdirnames

func (f *File) Readdirnames(n int) ([]string, error)

func (*File) Seek

func (f *File) Seek(offset int64, whence int) (int64, error)

func (*File) Stat

func (f *File) Stat() (os.FileInfo, error)

func (*File) Sync

func (f *File) Sync() error

func (*File) Truncate

func (f *File) Truncate(size int64) error

func (*File) Write

func (f *File) Write(p []byte) (n int, err error)

func (*File) WriteAt

func (f *File) WriteAt(p []byte, off int64) (n int, err error)

func (*File) WriteString

func (f *File) WriteString(s string) (ret int, err error)

type FileInfo

type FileInfo struct {
	os.FileInfo
	// contains filtered or unexported fields
}

func (FileInfo) Sys

func (fi FileInfo) Sys() interface{}

type VirtualFS

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

func (*VirtualFS) Chmod

func (t *VirtualFS) Chmod(path string, mode os.FileMode) error

func (*VirtualFS) Chtimes

func (t *VirtualFS) Chtimes(path string, modTime, accTime time.Time) error

func (*VirtualFS) Create

func (t *VirtualFS) Create(path string) (afero.File, error)

func (*VirtualFS) Mkdir

func (t *VirtualFS) Mkdir(path string, mode os.FileMode) error

Mkdir creates a new directory according to the path argument passed in

func (*VirtualFS) MkdirAll

func (t *VirtualFS) MkdirAll(path string, mode os.FileMode) error

MkdirAll creates a new directory according to the path argument passed in

func (*VirtualFS) Name

func (t *VirtualFS) Name() string

func (*VirtualFS) Open

func (t *VirtualFS) Open(path string) (afero.File, error)

func (*VirtualFS) OpenFile

func (t *VirtualFS) OpenFile(path string, flag int, mode os.FileMode) (afero.File, error)

func (*VirtualFS) Remove

func (t *VirtualFS) Remove(path string) error

func (*VirtualFS) RemoveAll

func (t *VirtualFS) RemoveAll(path string) error

func (*VirtualFS) Rename

func (t *VirtualFS) Rename(new, old string) error

func (*VirtualFS) Stat

func (t *VirtualFS) Stat(path string) (os.FileInfo, error)

type ZipExtraInfo

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

func (ZipExtraInfo) Atime

func (zInfo ZipExtraInfo) Atime() time.Time

func (ZipExtraInfo) Ctime

func (zInfo ZipExtraInfo) Ctime() time.Time

func (ZipExtraInfo) GID

func (zInfo ZipExtraInfo) GID() int

func (ZipExtraInfo) Mtime

func (zInfo ZipExtraInfo) Mtime() time.Time

func (ZipExtraInfo) UID

func (zInfo ZipExtraInfo) UID() int

Jump to

Keyboard shortcuts

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