Documentation ¶
Index ¶
- func MakeError(op string, path string, text string) error
- func MakeWrappedError(op string, path string, err error) error
- func NewInfoDataFromNode(inode *mockData, name string) *infoData
- type Entry
- type FS
- type FakeFS
- func (f *FakeFS) Chdir(dir string) error
- func (f *FakeFS) Chmod(name string, mode os.FileMode) error
- func (f *FakeFS) Chown(name string, uid, gid int) error
- func (f *FakeFS) CorruptDirtyPages(seedRand *rand.Rand)
- func (f *FakeFS) CorruptFile(path string, offset int64) error
- func (f *FakeFS) Create(path string) (*File, error)
- func (f *FakeFS) CreateTemp(dir, pattern string) (*File, error)
- func (f *FakeFS) Mkdir(name string, perm os.FileMode) error
- func (f *FakeFS) MkdirAll(path string, perm os.FileMode) error
- func (f *FakeFS) MkdirTemp(dir, pattern string) (string, error)
- func (f *FakeFS) Open(name string) (*File, error)
- func (f *FakeFS) OpenFile(name string, flag int, perm os.FileMode) (*File, error)
- func (f *FakeFS) ReadDir(name string) ([]os.DirEntry, error)
- func (f *FakeFS) ReadFile(name string) ([]byte, error)
- func (f *FakeFS) Readlink(name string) (string, error)
- func (f *FakeFS) Release()
- func (f *FakeFS) Remove(name string) error
- func (f *FakeFS) RemoveAll(path string) error
- func (f *FakeFS) Rename(oldpath, newpath string) error
- func (f *FakeFS) Stat(name string) (os.FileInfo, error)
- func (f *FakeFS) Truncate(name string, size int64) error
- func (f *FakeFS) WriteFile(name string, data []byte, perm os.FileMode) error
- type FakeFile
- func (f *FakeFile) Chdir() error
- func (f *FakeFile) Chmod(mode os.FileMode) error
- func (f *FakeFile) Chown(uid, gid int) error
- func (f *FakeFile) Close() error
- func (f *FakeFile) Name() string
- func (f *FakeFile) Read(b []byte) (n int, err error)
- func (f *FakeFile) ReadAt(b []byte, off int64) (n int, err error)
- func (f *FakeFile) ReadDir(n int) ([]os.DirEntry, error)
- func (f *FakeFile) ReadFrom(r io.Reader) (n int64, err error)
- func (f *FakeFile) Readdir(n int) ([]os.FileInfo, error)
- func (f *FakeFile) Readdirnames(n int) (names []string, err error)
- func (f *FakeFile) Seek(offset int64, whence int) (ret int64, err error)
- func (f *FakeFile) Stat() (os.FileInfo, error)
- func (f *FakeFile) Sync() error
- func (f *FakeFile) Truncate(size int64) error
- func (f *FakeFile) Write(b []byte) (n int, err error)
- func (f *FakeFile) WriteAt(b []byte, off int64) (n int, err error)
- func (f *FakeFile) WriteString(s string) (n int, err error)
- type File
- func (f *File) Chdir() error
- func (f *File) Chmod(mode os.FileMode) error
- func (f *File) Chown(uid, gid int) error
- func (f *File) Close() error
- func (f *File) Fd() uintptr
- func (f *File) IsFake() bool
- func (f *File) Name() string
- func (f *File) Read(b []byte) (n int, err error)
- func (f *File) ReadAt(b []byte, off int64) (n int, err error)
- func (f *File) ReadDir(n int) ([]os.DirEntry, error)
- func (f *File) ReadFrom(r io.Reader) (n int64, err error)
- func (f *File) Readdir(n int) ([]os.FileInfo, error)
- func (f *File) Readdirnames(n int) (names []string, err error)
- func (f *File) Seek(offset int64, whence int) (ret int64, err error)
- func (f *File) SetDeadline(t time.Time) error
- func (f *File) SetReadDeadline(t time.Time) error
- func (f *File) SetWriteDeadline(t time.Time) error
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sync() error
- func (f *File) Truncate(size int64) error
- func (f *File) Write(b []byte) (n int, err error)
- func (f *File) WriteAt(b []byte, off int64) (n int, err error)
- func (f *File) WriteString(s string) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInfoDataFromNode ¶
func NewInfoDataFromNode(inode *mockData, name string) *infoData
Types ¶
type FS ¶
type FS interface { Create(name string) (*File, error) CreateTemp(dir, pattern string) (*File, error) // NewFile(fd uintptr, name string) *File // TODO: ??? Open(name string) (*File, error) OpenFile(name string, flag int, perm os.FileMode) (*File, error) Chdir(dir string) error Chmod(name string, mode os.FileMode) error Chown(name string, uid, gid int) error Mkdir(name string, perm os.FileMode) error MkdirAll(path string, perm os.FileMode) error MkdirTemp(dir, pattern string) (string, error) ReadFile(name string) ([]byte, error) Readlink(name string) (string, error) ReadDir(name string) ([]os.DirEntry, error) Remove(name string) error RemoveAll(path string) error Rename(oldpath, newpath string) error Truncate(name string, size int64) error WriteFile(name string, data []byte, perm os.FileMode) error Stat(name string) (os.FileInfo, error) }
type FakeFS ¶
type FakeFS struct {
// contains filtered or unexported fields
}
func NewMemoryFs ¶
func NewMemoryFs() *FakeFS
func (*FakeFS) CorruptDirtyPages ¶
This function will probably changed by v1.0
func (*FakeFS) CorruptFile ¶
This function will probably changed by v1.0
type FakeFile ¶
type FakeFile struct {
// contains filtered or unexported fields
}
Kinda like descriptor
Click to show internal directories.
Click to hide internal directories.