Documentation ¶
Overview ¶
Package stripprefix is a file-system abstraction layer to strip a part of the path
Index ¶
- Variables
- func NewStripPrefixFs(source afero.Fs, start int) afero.Fs
- type File
- type Fs
- func (b *Fs) Chmod(name string, mode os.FileMode) (err error)
- func (b *Fs) Chown(name string, uid int, gid int) (err error)
- func (b *Fs) Chtimes(name string, atime, mtime time.Time) (err error)
- func (b *Fs) Create(name string) (f afero.File, err error)
- func (b *Fs) LstatIfPossible(name string) (os.FileInfo, bool, error)
- func (b *Fs) Mkdir(name string, mode os.FileMode) (err error)
- func (b *Fs) MkdirAll(name string, mode os.FileMode) (err error)
- func (b *Fs) Name() string
- func (b *Fs) Open(name string) (f afero.File, err error)
- func (b *Fs) OpenFile(name string, flag int, mode os.FileMode) (f afero.File, err error)
- func (b *Fs) Remove(name string) (err error)
- func (b *Fs) RemoveAll(name string) (err error)
- func (b *Fs) Rename(oldname, newname string) (err error)
- func (b *Fs) Stat(name string) (fi os.FileInfo, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBasePathTooShort = errors.New("path needs to at least as long as its prefix")
ErrBasePathTooShort is returned when the specified path is too short
Functions ¶
Types ¶
type Fs ¶
type Fs struct {
// contains filtered or unexported fields
}
Fs is a convenience afero.Fs to remove the prefix of a path
func (*Fs) Create ¶
Create creates a file in the filesystem, returning the file and an error, if any happens.
func (*Fs) LstatIfPossible ¶
LstatIfPossible implements afero.Lstater.LstatIfPossible
Click to show internal directories.
Click to hide internal directories.