tstor/fs/fs.go
Antonio Navarro Perez 0f513ef8b3
Change module name to distribyted/distribyted (#36)
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2021-03-01 17:43:28 +01:00

23 lines
511 B
Go

package fs
import (
"github.com/distribyted/distribyted/iio"
)
type File interface {
IsDir() bool
Size() int64
iio.Reader
}
type Filesystem interface {
// Open opens the named file for reading. If successful, methods on the
// returned file can be used for reading; the associated file descriptor has
// mode O_RDONLY.
Open(filename string) (File, error)
// ReadDir reads the directory named by dirname and returns a list of
// directory entries.
ReadDir(path string) (map[string]File, error)
}