Documentation ¶
Index ¶
- Variables
- type File
- type FileManager
- type FileSystem
- type IOFile
- type LockFile
- type MemFile
- func (m *MemFile) Close() error
- func (m *MemFile) IsDir() bool
- func (m *MemFile) ModTime() time.Time
- func (m *MemFile) Mode() os.FileMode
- func (m *MemFile) Name() string
- func (m *MemFile) ReadAt(p []byte, off int64) (int, error)
- func (m *MemFile) Size() int64
- func (m *MemFile) Slice(start int64, end int64) ([]byte, error)
- func (m *MemFile) Stat() (os.FileInfo, error)
- func (m *MemFile) Sync() error
- func (m *MemFile) Sys() interface{}
- func (m *MemFile) Truncate(size int64) error
- func (m *MemFile) Type() string
- func (m *MemFile) WriteAt(p []byte, off int64) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var FileIO = &iofs{}
FileIO is a file system backed by the io package.
View Source
var Mem = &memfs{files: map[string]*MemFile{}}
Mem is a file system backed by memory.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File interface { io.Closer io.ReaderAt io.WriterAt Stat() (os.FileInfo, error) Sync() error Truncate(size int64) error }
File is the interface compatible with os.File.
type FileManager ¶
FileManager is an interface to support different types of storage such file based storage or a memory-mapped file storage.
type FileSystem ¶
type FileSystem interface { OpenFile(name string, flag int, perm os.FileMode) (FileManager, error) CreateLockFile(name string) (LockFile, error) Stat(name string) (os.FileInfo, error) Remove(name string) error }
FileSystem represents a virtual file system.
type IOFile ¶
IOFile is file system based store for DB
type MemFile ¶
type MemFile struct {
// contains filtered or unexported fields
}
MemFile mem file is used to write buffer to memory store
Click to show internal directories.
Click to hide internal directories.