filesystem

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClosableRWFile

type ClosableRWFile interface {
	Close() error
	Write(p []byte) (n int, err error)
	Read(p []byte) (n int, err error)
}

type FileSystem

type FileSystem struct{}

func (FileSystem) Copy

func (f FileSystem) Copy(dst io.Writer, src io.Reader) (written int64, err error)

func (FileSystem) Create

func (f FileSystem) Create(name string) (ClosableRWFile, error)

func (FileSystem) MkdirAll

func (f FileSystem) MkdirAll(path string, perm os.FileMode) error

func (FileSystem) Open

func (f FileSystem) Open(path string) (ClosableRWFile, error)

func (FileSystem) OpenFile

func (f FileSystem) OpenFile(path string, flag int, perm os.FileMode) (ClosableRWFile, error)

func (FileSystem) ReadAll

func (f FileSystem) ReadAll(r io.Reader) ([]byte, error)

func (FileSystem) ReadDir

func (f FileSystem) ReadDir(path string) ([]fs.DirEntry, error)

func (FileSystem) Remove

func (f FileSystem) Remove(path string) error

func (FileSystem) RemoveAll

func (f FileSystem) RemoveAll(path string) error

func (FileSystem) Stat

func (f FileSystem) Stat(name string) (os.FileInfo, error)

func (FileSystem) WalkDir

func (f FileSystem) WalkDir(root string, fn fs.WalkDirFunc) error

func (FileSystem) WriteFile

func (f FileSystem) WriteFile(path string, data []byte, perm os.FileMode) error

type Filesystem

type Filesystem interface {
	Stat(name string) (os.FileInfo, error)
	MkdirAll(path string, perm os.FileMode) error
	Create(name string) (ClosableRWFile, error)
	Open(path string) (ClosableRWFile, error)
	OpenFile(path string, flag int, perm os.FileMode) (ClosableRWFile, error)
	ReadAll(r io.Reader) ([]byte, error)
	WriteFile(name string, data []byte, perm os.FileMode) error
	Remove(name string) error
	RemoveAll(path string) error
	ReadDir(name string) ([]os.DirEntry, error)
	Copy(dst io.Writer, src io.Reader) (written int64, err error)
	WalkDir(root string, fn fs.WalkDirFunc) error
}

Jump to

Keyboard shortcuts

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