Documentation
¶
Overview ¶
Package vfscache deals with caching of files locally for the VFS layer
Index ¶
- type Cache
- func (c *Cache) Check(ctx context.Context, o fs.Object, remote string) error
- func (c *Cache) CleanUp() error
- func (c *Cache) Close(name string)
- func (c *Cache) Exists(name string) bool
- func (c *Cache) Fetch(ctx context.Context, o fs.Object, remote string) error
- func (c *Cache) Mkdir(name string) (string, error)
- func (c *Cache) Open(name string)
- func (c *Cache) Opens(name string) int
- func (c *Cache) Remove(name string)
- func (c *Cache) Rename(name string, newName string) (err error)
- func (c *Cache) SetModTime(name string, modTime time.Time)
- func (c *Cache) Store(ctx context.Context, objOld fs.Object, remote string) (fs.Object, error)
- func (c *Cache) ToOSPath(name string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache opened files
func New ¶
New creates a new cache heirachy for fremote
This starts background goroutines which can be cancelled with the context passed in.
func (*Cache) Mkdir ¶
Mkdir makes the directory for name in the cache and returns an os path for the file
name should be a remote path not an osPath
func (*Cache) Opens ¶
Opens returns the number of opens that are on the file
name should be a remote path not an osPath
func (*Cache) SetModTime ¶
SetModTime should be called to set the modification time of the cache file
Click to show internal directories.
Click to hide internal directories.