Documentation ¶
Index ¶
- func IsErrAlreadyMounted(err error) bool
- func IsErrCrossFsRename(err error) bool
- func IsErrNotAFile(err error) bool
- func IsErrNotMounted(err error) bool
- func IsErrOsFs(err error) bool
- func IsErrRecursiveMount(err error) bool
- func IsErrShortCopy(err error) bool
- func IsMountNode(info os.FileInfo) bool
- type MountableFs
- func (m *MountableFs) Chmod(name string, mode os.FileMode) error
- func (m *MountableFs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (m *MountableFs) Create(name string) (File, error)
- func (m *MountableFs) Mkdir(name string, perm os.FileMode) error
- func (m *MountableFs) MkdirAll(path string, perm os.FileMode) error
- func (m *MountableFs) Mount(path string, fs Fs) error
- func (m *MountableFs) Name() string
- func (m *MountableFs) Open(name string) (File, error)
- func (m *MountableFs) OpenFile(name string, flag int, perm os.FileMode) (File, error)
- func (m *MountableFs) Remount(path string, fs Fs) error
- func (m *MountableFs) Remove(name string) error
- func (m *MountableFs) RemoveAll(path string) error
- func (m *MountableFs) Rename(oldname string, newname string) error
- func (m *MountableFs) Stat(name string) (os.FileInfo, error)
- func (m *MountableFs) Umount(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrAlreadyMounted ¶
func IsErrCrossFsRename ¶
func IsErrNotAFile ¶
func IsErrNotMounted ¶
func IsErrRecursiveMount ¶
func IsErrShortCopy ¶
func IsMountNode ¶
Types ¶
type MountableFs ¶
type MountableFs struct { // If true, it is possible to mount an Fs over an existing file or directory. // If false, attempting to do so will result in an error. AllowMasking bool // If true, the same Fs can be mounted inside an existing mount of the same Fs, // for e.g: // child := afero.NewMemMapFs() // mfs.Mount("/yep", child) // mfs.Mount("/yep/yep", child) AllowRecursiveMount bool // contains filtered or unexported fields }
MountableFs allows different paths in a hierarchy to be served by different afero.Fs objects.
func NewMountableFs ¶
func NewMountableFs(base Fs) *MountableFs
func (*MountableFs) Create ¶
func (m *MountableFs) Create(name string) (File, error)
func (*MountableFs) Mount ¶
func (m *MountableFs) Mount(path string, fs Fs) error
Mount an afero.Fs at the specified path.
This will fail if there is already a Fs at the path, or any existing mounted Fs contains a file at that path.
You must wrap an afero.OsFs in an afero.BasePathFs to mount it, even if that's just to dispose of the Windows drive letter.
func (*MountableFs) Name ¶
func (m *MountableFs) Name() string
func (*MountableFs) Open ¶
func (m *MountableFs) Open(name string) (File, error)
func (*MountableFs) Remount ¶
func (m *MountableFs) Remount(path string, fs Fs) error
func (*MountableFs) Remove ¶
func (m *MountableFs) Remove(name string) error
func (*MountableFs) RemoveAll ¶
func (m *MountableFs) RemoveAll(path string) error
func (*MountableFs) Umount ¶
func (m *MountableFs) Umount(path string) error
Click to show internal directories.
Click to hide internal directories.