Documentation
¶
Index ¶
- Constants
- Variables
- func Dir(base StatCloser, fis []fs.FileInfo) http.File
- func DownloadFile(localFile string, file http.File) (err error)
- func IsOffline(fs http.FileSystem) bool
- func IsRemote(mode fs.FileMode) bool
- func New(local string, remote Remote, offline ...bool) http.FileSystem
- type Remote
- type StatCloser
Constants ¶
View Source
const (
ModeRemote = fs.ModeSymlink | fs.ModeIrregular
)
Variables ¶
View Source
var (
ErrOffline = errors.New("remote filesystem is offline")
)
Functions ¶
func DownloadFile ¶ added in v1.12.8
func IsOffline ¶ added in v1.12.9
func IsOffline(fs http.FileSystem) bool
Types ¶
type Remote ¶
type Remote interface { Init(local string, offline bool) Lstat(localFile string) (fs.FileInfo, error) ReaddirAll(localDir string, dir *os.File, offline bool) (fis []fs.FileInfo, err error) SyncLstat(local string, name string) (fs.FileInfo, error) SyncOpen(local string, name string) (http.File, error) }
Click to show internal directories.
Click to hide internal directories.