mirror of
https://github.com/octoleo/restic.git
synced 2024-11-04 20:37:49 +00:00
1b20f6beec
It was only used in a single test, which now uses plain *os.File instead.
38 lines
766 B
Go
38 lines
766 B
Go
package fs
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
// FS bundles all methods needed for a file system.
|
|
type FS interface {
|
|
Open(name string) (File, error)
|
|
OpenFile(name string, flag int, perm os.FileMode) (File, error)
|
|
Stat(name string) (os.FileInfo, error)
|
|
Lstat(name string) (os.FileInfo, error)
|
|
|
|
Join(elem ...string) string
|
|
Separator() string
|
|
Abs(path string) (string, error)
|
|
Clean(path string) string
|
|
VolumeName(path string) string
|
|
IsAbs(path string) bool
|
|
|
|
Dir(path string) string
|
|
Base(path string) string
|
|
}
|
|
|
|
// File is an open file on a file system.
|
|
type File interface {
|
|
io.Reader
|
|
io.Closer
|
|
|
|
Fd() uintptr
|
|
Readdirnames(n int) ([]string, error)
|
|
Readdir(int) ([]os.FileInfo, error)
|
|
Seek(int64, int) (int64, error)
|
|
Stat() (os.FileInfo, error)
|
|
Name() string
|
|
}
|