fs

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 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 DirEntry

type DirEntry struct {
	Name  string
	IsDir bool
}

type FS

type FS interface {
	Stat(path string) (*FileInfo, error)
	List(path string) ([]DirEntry, error)
	Read(path string) ([]byte, error)
}

func NewNative

func NewNative() FS

type FileInfo

type FileInfo struct {
	Name  string
	IsDir bool
}

type MemFS

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

func NewMem

func NewMem() *MemFS

func (*MemFS) List

func (m *MemFS) List(path string) ([]DirEntry, error)

func (*MemFS) Put

func (m *MemFS) Put(path string, data []byte)

func (*MemFS) PutCombined

func (m *MemFS) PutCombined(all string)

func (*MemFS) Read

func (m *MemFS) Read(path string) ([]byte, error)

func (*MemFS) Stat

func (m *MemFS) Stat(path string) (*FileInfo, error)

Jump to

Keyboard shortcuts

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