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
}
var ( DefaultDiskFileSystemLayer IFileSystemLayer DefaultMemoryFileSystemLayer IFileSystemLayer )
func FslFactory ¶
func FslFactory(t FslType) IFileSystemLayer
Click to show internal directories.
Click to hide internal directories.