xfs

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FD added in v0.0.12

type FD = interface {
	io.Writer
	io.Closer
	Stat() (fs.FileInfo, error)
	Cancel() error
}

type File

type File struct {
	Path  string
	Bytes []byte
}

type FileSystem added in v0.0.12

type FileSystem interface {
	fs.FS
	Create(path string, attr *struct{}) (FD, error)
	Remove(path string) error
}

type XFS

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

func New

func New(fsys FileSystem) *XFS

func (*XFS) Create added in v0.0.12

func (xfs *XFS) Create(file File) (File, error)

Write file

func (*XFS) Read

func (xfs *XFS) Read(path string) (File, error)

Read file

func (*XFS) Remove added in v0.0.12

func (xfs *XFS) Remove(file File) (File, error)

func (*XFS) Walk

func (xfs *XFS) Walk(ctx context.Context, dir string, ext string) (<-chan string, <-chan error)

Walk (recursivly) dir at filesystem, matching files with extension

Jump to

Keyboard shortcuts

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