go-watchdog/cmd/watchdog/installer/filesystem.go

24 lines
458 B
Go
Raw Normal View History

2019-06-27 08:54:51 +00:00
package installer
import (
"io"
"os"
)
2019-06-29 21:05:13 +00:00
// "A little copying is better than a little dependency"
// These are here so that we don't need a dependency on http.FileSystem and http.File
// FileSystem is the same as http.FileSystem
2019-06-27 08:54:51 +00:00
type FileSystem interface {
Open(name string) (File, error)
}
2019-06-29 21:05:13 +00:00
// File is the same as http.File
2019-06-27 08:54:51 +00:00
type File interface {
io.Closer
io.Reader
io.Seeker
Readdir(count int) ([]os.FileInfo, error)
Stat() (os.FileInfo, error)
}