it works
This commit is contained in:
26
vfs/vfs.go
Normal file
26
vfs/vfs.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package vfs
|
||||
|
||||
// VFS is the interface that wraps the basic methods of a virtual file system.
|
||||
type VFS interface {
|
||||
// Name returns the name of the file system.
|
||||
Name() string
|
||||
|
||||
// Size returns the total size of all files in the file system.
|
||||
Size() int64
|
||||
|
||||
// Set sets the value of key as src.
|
||||
// Setting the same key multiple times, the last set call takes effect.
|
||||
Set(key string, src []byte) error
|
||||
|
||||
// Delete deletes the value of key.
|
||||
Delete(key string) error
|
||||
|
||||
// Get gets the value of key to dst, and returns dst no matter whether or not there is an error.
|
||||
Get(key string) ([]byte, error)
|
||||
|
||||
// Stat returns the FileInfo of key.
|
||||
Stat(key string) (*FileInfo, error)
|
||||
|
||||
// StatAll returns the FileInfo of all keys.
|
||||
StatAll() []*FileInfo
|
||||
}
|
||||
Reference in New Issue
Block a user