// vfs/vfs.go package vfs import "io" // 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 // Create creates a new file at key with expected size. Create(key string, size int64) (io.WriteCloser, error) // Delete deletes the value of key. Delete(key string) error // Open opens the file at key. Open(key string) (io.ReadCloser, error) // Stat returns the FileInfo of key. Stat(key string) (*FileInfo, error) // StatAll returns the FileInfo of all keys. StatAll() []*FileInfo }