Documentation ¶
Index ¶
- Variables
- type FSLDisk
- func (f *FSLDisk) Create(name string) (IFile, error)
- func (f *FSLDisk) MkdirAll(path string, perm uint32) error
- func (f *FSLDisk) ReadFile(filename string) ([]byte, error)
- func (f *FSLDisk) Remove(name string) error
- func (f *FSLDisk) RemoveAll(path string) error
- func (f *FSLDisk) Rename(oldpath string, newpath string) error
- func (f *FSLDisk) Type() FSLType
- func (f *FSLDisk) WriteFile(filename string, data []byte, perm uint32) error
- type FSLMemory
- func (f *FSLMemory) Create(name string) (IFile, error)
- func (f *FSLMemory) MkdirAll(path string, perm uint32) error
- func (f *FSLMemory) ReadFile(filename string) ([]byte, error)
- func (f *FSLMemory) Remove(name string) error
- func (f *FSLMemory) RemoveAll(path string) error
- func (f *FSLMemory) Rename(oldpath string, newpath string) error
- func (f *FSLMemory) Type() FSLType
- func (f *FSLMemory) WriteFile(filename string, data []byte, perm uint32) error
- type FSLType
- type IFile
- type IFileSystemLayer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("naza filesystemlayer: not found")
Functions ¶
This section is empty.
Types ¶
type FSLMemory ¶
type FSLMemory struct {
// contains filtered or unexported fields
}
func NewFSLMemory ¶
func NewFSLMemory() *FSLMemory
type IFileSystemLayer ¶
type IFileSystemLayer interface { Type() FSLType // 创建文件 // 原始语义:如果文件已经存在,原文件内容被清空 Create(name string) (IFile, error) Rename(oldpath string, newpath string) error MkdirAll(path string, perm uint32) error Remove(name string) error RemoveAll(path string) error ReadFile(filename string) ([]byte, error) WriteFile(filename string, data []byte, perm uint32) error }
func FSLFactory ¶
func FSLFactory(t FSLType) IFileSystemLayer
Click to show internal directories.
Click to hide internal directories.