fs

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	os.FileInfo
	fs.Interface
}

Entry is an entry in the mock filesystem

func Dir

func Dir(name string, entries ...Entry) Entry

Dir creates a new directory with the given entries.

type File

type File struct {
	FName     string
	FContents string
	FStat     syscall.Stat_t
	// contains filtered or unexported fields
}

File is a mock file

func (File) IsDir

func (p File) IsDir() bool

IsDir implements os.FileInfo

func (File) Lstat

func (p File) Lstat(path string, stat *syscall.Stat_t) error

Lstat implements FS

func (File) ModTime

func (File) ModTime() time.Time

func (File) Mode

func (File) Mode() os.FileMode

func (File) Name

func (p File) Name() string

Name implements os.FileInfo

func (File) Open

func (p File) Open(path string) (io.ReadWriteCloser, error)

Open implements FS

func (File) ReadDir

func (p File) ReadDir(path string) ([]os.FileInfo, error)

ReadDir implements FS

func (File) ReadDirNames

func (p File) ReadDirNames(path string) ([]string, error)

ReadDirNames implements FS

func (File) ReadFile

func (p File) ReadFile(path string) ([]byte, error)

ReadFile implements FS

func (File) Size

func (File) Size() int64

func (File) Stat

func (p File) Stat(path string, stat *syscall.Stat_t) error

Stat implements FS

func (File) Sys

func (File) Sys() interface{}

Jump to

Keyboard shortcuts

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