filesystem

package
v0.0.0-...-89dfdfc Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst string) (int64, error)

Copy copies a file and returns the bytes transferred

func Delete

func Delete(path string)

func Exists

func Exists(path string) bool

func FolderExists

func FolderExists(path string) bool

func MakeDirectory

func MakeDirectory(path string)

func Move

func Move(src, dst string) error

func Read

func Read(path string) string

func Write

func Write(path string, data string)

Types

type FS

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

func NewFS

func NewFS(fs fs.FS) *FS

func (*FS) FS

func (f *FS) FS() fs.FS

func (*FS) HasDir

func (f *FS) HasDir(dir string) bool

func (*FS) HttpFS

func (f *FS) HttpFS() http.FileSystem

func (*FS) ServeContent

func (f *FS) ServeContent(writer http.ResponseWriter, request *http.Request, file string)

func (*FS) Sub

func (f *FS) Sub(path string) *FS

type Store

type Store interface {
	HasDir(dir string) bool
	HttpFS() http.FileSystem
	FS() fs.FS
	ServeContent(writer http.ResponseWriter, request *http.Request, file string)
	Sub(path string) *FS
}

Jump to

Keyboard shortcuts

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