Documentation ¶
Overview ¶
Package fslog provides an afero FS logging package
Index ¶
- Variables
- func CheckFlag(flag int, allowedFlags int) bool
- func New(mgr *ddrv.Manager) afero.Fs
- func NewLogFs(src afero.Fs) afero.Fs
- type File
- func (f *File) Close() error
- func (f *File) IsDir() bool
- func (f *File) ModTime() time.Time
- func (f *File) Mode() os.FileMode
- func (f *File) Name() string
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) ReadAt(p []byte, off int64) (n int, err error)
- func (f *File) Readdir(count int) ([]os.FileInfo, error)
- func (f *File) Readdirnames(n int) ([]string, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Size() int64
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sync() error
- func (f *File) Sys() interface{}
- func (f *File) Truncate(_ int64) error
- func (f *File) Write(p []byte) (int, error)
- func (f *File) WriteAt(_ []byte, _ int64) (int, error)
- func (f *File) WriteString(s string) (ret int, err error)
- type Fs
- func (fs *Fs) Chmod(_ string, _ os.FileMode) error
- func (fs *Fs) Chown(_ string, _, _ int) error
- func (fs *Fs) Chtimes(name string, _ time.Time, mtime time.Time) error
- func (fs *Fs) Create(name string) (afero.File, error)
- func (fs *Fs) Mkdir(name string, _ os.FileMode) error
- func (fs *Fs) MkdirAll(path string, _ os.FileMode) error
- func (fs *Fs) Name() string
- func (fs *Fs) Open(name string) (afero.File, error)
- func (fs *Fs) OpenFile(name string, flag int, _ os.FileMode) (afero.File, error)
- func (fs *Fs) Remove(name string) error
- func (fs *Fs) RemoveAll(path string) error
- func (fs *Fs) Rename(oldname, newname string) error
- func (fs *Fs) Stat(name string) (os.FileInfo, error)
- type LogFs
- func (lf *LogFs) Chmod(name string, mode os.FileMode) error
- func (lf *LogFs) Chown(name string, uid int, gid int) error
- func (lf *LogFs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (lf *LogFs) Create(name string) (afero.File, error)
- func (lf *LogFs) Mkdir(name string, perm os.FileMode) error
- func (lf *LogFs) MkdirAll(path string, perm os.FileMode) error
- func (lf *LogFs) Name() string
- func (lf *LogFs) Open(name string) (afero.File, error)
- func (lf *LogFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)
- func (lf *LogFs) Remove(name string) error
- func (lf *LogFs) RemoveAll(path string) error
- func (lf *LogFs) Rename(oldname, newname string) error
- func (lf *LogFs) Stat(name string) (os.FileInfo, error)
- type LogFsFile
- func (lff *LogFsFile) Close() error
- func (lff *LogFsFile) Name() string
- func (lff *LogFsFile) Read(p []byte) (int, error)
- func (lff *LogFsFile) ReadAt(p []byte, off int64) (int, error)
- func (lff *LogFsFile) Readdir(count int) ([]os.FileInfo, error)
- func (lff *LogFsFile) Readdirnames(n int) ([]string, error)
- func (lff *LogFsFile) Seek(offset int64, whence int) (int64, error)
- func (lff *LogFsFile) Stat() (os.FileInfo, error)
- func (lff *LogFsFile) Sync() error
- func (lff *LogFsFile) Truncate(size int64) error
- func (lff *LogFsFile) Write(p []byte) (int, error)
- func (lff *LogFsFile) WriteAt(p []byte, off int64) (int, error)
- func (lff *LogFsFile) WriteString(str string) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIsDir = &os.PathError{Err: errors.New("is a directory")} ErrIsNotDir = &os.PathError{Err: errors.New("is not a directory")} ErrNotSupported = &os.PathError{Err: errors.New("fs doesn't support this operation")} ErrInvalidSeek = &os.PathError{Err: errors.New("invalid seek offset")} ErrReadOnly = os.ErrPermission )
Functions ¶
Types ¶
type Fs ¶
type Fs struct {
// contains filtered or unexported fields
}
type LogFs ¶
type LogFs struct {
// contains filtered or unexported fields
}
LogFs is a wrapper to log interactions around file system accesses
type LogFsFile ¶
type LogFsFile struct {
// contains filtered or unexported fields
}
LogFsFile is a wrapper to log interactions around file accesses
func (*LogFsFile) Readdirnames ¶
Readdirnames won't be logged
Click to show internal directories.
Click to hide internal directories.