remote

package
v1.13.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DbgFlagNetwork = 1 << iota
	DbgFlagAll     = DbgFlagNetwork
)
View Source
const (
	SysFilePrefix = ".fscache."
)

Variables

This section is empty.

Functions

func NewCached

func NewCached(local string, fsRemote http.FileSystem, notifyOrNil NotifyFile, cacheFile bool, offline ...bool) (fs http.FileSystem, err error)

NewCached creates a cached http.FileSystem to speed up listing directories and accessing file contents (optional, only when `cacheFile` is true). If `offline` is true, the cached http.FileSystem doesn't access `fsRemote http.FileSystem`.

func NewRemote

func NewRemote(fsRemote http.FileSystem, notifyOrNil NotifyFile, cacheFile bool) (ret cached.Remote, err error)

func SetDebug

func SetDebug(dbgFlags int)

func TouchDirCached added in v1.12.21

func TouchDirCached(dir string) error

func WriteStubFile added in v1.12.21

func WriteStubFile(localFile string, fi fs.FileInfo) error

Types

type NotifyFile

type NotifyFile interface {
	NotifyFile(ctx context.Context, name string, fi fs.FileInfo)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL