fs

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory added in v0.2.0

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

func NewDirectory added in v0.2.0

func NewDirectory(filesystem Driver, dir string) *Directory

func (*Directory) ReadFile added in v0.2.0

func (d *Directory) ReadFile(path string) ([]byte, error)

func (*Directory) Up added in v0.3.0

func (d *Directory) Up() (*Directory, error)

type Driver

type Driver interface {
	Exists(path string) bool
	ReadFile(path string) ([]byte, error)
	Mkdir(path string) error
	Write(path string, content []byte) (FileInfo, error)
}

type FileInfo

type FileInfo struct {
	Path string
	Size int64
}

type Local

type Local struct {
}

func NewLocal

func NewLocal() *Local

func (*Local) Exists

func (*Local) Exists(path string) bool

func (*Local) Mkdir

func (*Local) Mkdir(path string) error

func (*Local) ReadFile added in v0.2.0

func (*Local) ReadFile(path string) ([]byte, error)

func (*Local) Write

func (*Local) Write(path string, content []byte) (FileInfo, error)

Jump to

Keyboard shortcuts

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