fscache

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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
}

func New

func New() *Cache

func (*Cache) Clear

func (c *Cache) Clear()

func (*Cache) Create

func (c *Cache) Create(name string)

Create event

func (*Cache) Delete

func (c *Cache) Delete(name string)

Delete event

func (*Cache) Has

func (c *Cache) Has(path string) (ok bool)

func (*Cache) Keys

func (c *Cache) Keys() (keys []string)

func (*Cache) Open

func (c *Cache) Open(path string) (fs.File, error)

func (*Cache) Set

func (c *Cache) Set(path string, entry Entry)

func (*Cache) Update

func (c *Cache) Update(name string)

Update event

func (*Cache) Wrap

func (c *Cache) Wrap(name string, fsys fs.FS) fs.FS

type Dir

type Dir struct {
	Name    string
	Entries []fs.DirEntry
	Mode    fs.FileMode
	ModTime time.Time
	Sys     interface{}
}

type DirEntry

type DirEntry struct {
	Base    string // Base name
	Mode    fs.FileMode
	ModTime time.Time
	Sys     interface{}
}

func (*DirEntry) Info

func (e *DirEntry) Info() (fs.FileInfo, error)

func (*DirEntry) IsDir

func (e *DirEntry) IsDir() bool

func (*DirEntry) Name

func (e *DirEntry) Name() string

func (*DirEntry) Type

func (e *DirEntry) Type() fs.FileMode

type Entry

type Entry interface {
	// contains filtered or unexported methods
}

func From

func From(file fs.File) (virtual Entry, err error)

From a file to a virtual file

type File

type File struct {
	Name    string
	Data    []byte
	Mode    fs.FileMode
	ModTime time.Time
	Sys     interface{}
}

File struct

type Wrapped

type Wrapped struct {
	// contains filtered or unexported fields
}

func (*Wrapped) Open

func (w *Wrapped) Open(name string) (fs.File, error)

Jump to

Keyboard shortcuts

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