filesystem

package
v0.40.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFromFS

func CopyFromFS(root, dest string, fsys Filesystem) (err error)

CopyFromFS copies files from the `src` dir on the accessor Filesystem to local filesystem into `dest` dir. The src path uses slashes as their separator. The dest path uses OS specific separator.

func NewMaskingFS

func NewMaskingFS(masked func(path string) bool, fs Filesystem) maskingFS

func NewOsFilesystem

func NewOsFilesystem(root string) osFilesystem

func NewSubFS

func NewSubFS(root string, fs Filesystem) subFS

func NewZipFS

func NewZipFS(archive *zip.Reader) zipFS

Types

type BillyFilesystem

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

BillyFilesystem is a template file accessor backed by a billy FS

func NewBillyFilesystem

func NewBillyFilesystem(fs billy.Filesystem) BillyFilesystem

func (BillyFilesystem) Open

func (b BillyFilesystem) Open(name string) (fs.File, error)

func (BillyFilesystem) ReadDir

func (b BillyFilesystem) ReadDir(name string) ([]fs.DirEntry, error)
func (b BillyFilesystem) Readlink(link string) (string, error)

func (BillyFilesystem) Stat

func (b BillyFilesystem) Stat(name string) (fs.FileInfo, error)

type Filesystem

type Filesystem interface {
	fs.ReadDirFS
	fs.StatFS
	Readlink(link string) (string, error)
}

Jump to

Keyboard shortcuts

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