Documentation
¶
Index ¶
- type CrossDeviceTestFs
- type ModeAwareMemMapFs
- func (m *ModeAwareMemMapFs) Chmod(name string, mode os.FileMode) error
- func (m *ModeAwareMemMapFs) Chown(name string, uid, gid int) error
- func (m *ModeAwareMemMapFs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (m *ModeAwareMemMapFs) Create(name string) (afero.File, error)
- func (m *ModeAwareMemMapFs) Mkdir(name string, perm os.FileMode) error
- func (m *ModeAwareMemMapFs) MkdirAll(path string, perm os.FileMode) error
- func (m *ModeAwareMemMapFs) Name() string
- func (m *ModeAwareMemMapFs) Open(name string) (afero.File, error)
- func (m *ModeAwareMemMapFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)
- func (m *ModeAwareMemMapFs) Remove(name string) error
- func (m *ModeAwareMemMapFs) RemoveAll(path string) error
- func (m *ModeAwareMemMapFs) Rename(oldname string, newname string) error
- func (m *ModeAwareMemMapFs) Stat(name string) (os.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrossDeviceTestFs ¶
A filesystem wrapper whose implementation of Rename will return EXDEV if the source and destination paths do not share the same first path component. This is to simulate cross-device rename errors.
func (*CrossDeviceTestFs) Rename ¶
func (c *CrossDeviceTestFs) Rename(oldpath, newpath string) error
type ModeAwareMemMapFs ¶
func NewModeAwareMemFs ¶
func NewModeAwareMemFs() *ModeAwareMemMapFs
func (*ModeAwareMemMapFs) Chmod ¶
func (m *ModeAwareMemMapFs) Chmod(name string, mode os.FileMode) error
func (*ModeAwareMemMapFs) Chown ¶
func (m *ModeAwareMemMapFs) Chown(name string, uid, gid int) error
func (*ModeAwareMemMapFs) Create ¶
func (m *ModeAwareMemMapFs) Create(name string) (afero.File, error)
Create creates a file in the filesystem, returning the file and an error, if any happens.
func (*ModeAwareMemMapFs) Mkdir ¶
func (m *ModeAwareMemMapFs) Mkdir(name string, perm os.FileMode) error
Mkdir creates a directory in the filesystem, return an error if any happens.
func (*ModeAwareMemMapFs) MkdirAll ¶
func (m *ModeAwareMemMapFs) MkdirAll(path string, perm os.FileMode) error
MkdirAll creates a directory path and all parents that does not exist yet.
func (*ModeAwareMemMapFs) Name ¶
func (m *ModeAwareMemMapFs) Name() string
func (*ModeAwareMemMapFs) Open ¶
func (m *ModeAwareMemMapFs) Open(name string) (afero.File, error)
Open opens a file, returning it or an error, if any happens.
func (*ModeAwareMemMapFs) OpenFile ¶
OpenFile opens a file using the given flags and the given mode.
func (*ModeAwareMemMapFs) Remove ¶
func (m *ModeAwareMemMapFs) Remove(name string) error
Remove removes a file identified by name, returning an error, if any happens.
func (*ModeAwareMemMapFs) RemoveAll ¶
func (m *ModeAwareMemMapFs) RemoveAll(path string) error
RemoveAll removes a directory path and any children it contains. It does not fail if the path does not exist (return nil).