Documentation ¶
Overview ¶
Package inmem is an in-memory file system.
Index ¶
- Variables
- func SplitPath(filePath string) ([]string, string)
- type Entries
- type FS
- func (f *FS) Create(name string) (*File, error)
- func (f *FS) MkdirAll(name string, perm fs.FileMode) error
- func (f *FS) Open(name string) (fs.File, error)
- func (f *FS) OpenFile(name string, flag int, perm os.FileMode) (*File, error)
- func (f *FS) ReadDir(name string) ([]fs.DirEntry, error)
- func (f *FS) WriteFile(filePath string, data []byte, perm fs.FileMode) error
- type File
- func (f *File) Close() error
- func (f *File) Info() (fs.FileInfo, error)
- func (f *File) IsDir() bool
- func (f *File) ModTime() time.Time
- func (f *File) Mode() fs.FileMode
- func (f *File) Name() string
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) Size() int64
- func (f *File) Stat() (fs.FileInfo, error)
- func (f *File) Sys() any
- func (f *File) Type() fs.FileMode
- func (f *File) Write(data []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFileNotFound = fmt.Errorf("file not found")
View Source
var ErrInvalidArg = fmt.Errorf("invalid argument")
Functions ¶
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.