local

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter provides a local filesystem implementation of filekit.FileSystem

func New

func New(root string) (*Adapter, error)

New creates a new local filesystem adapter

func (*Adapter) CreateDir

func (a *Adapter) CreateDir(ctx context.Context, path string) error

CreateDir implements filekit.FileSystem

func (*Adapter) Delete

func (a *Adapter) Delete(ctx context.Context, path string) error

Delete implements filekit.FileSystem

func (*Adapter) DeleteDir

func (a *Adapter) DeleteDir(ctx context.Context, path string) error

DeleteDir implements filekit.FileSystem

func (*Adapter) Download

func (a *Adapter) Download(ctx context.Context, path string) (io.ReadCloser, error)

Download implements filekit.FileSystem

func (*Adapter) Exists

func (a *Adapter) Exists(ctx context.Context, path string) (bool, error)

Exists implements filekit.FileSystem

func (*Adapter) FileInfo

func (a *Adapter) FileInfo(ctx context.Context, path string) (*filekit.File, error)

FileInfo implements filekit.FileSystem

func (*Adapter) List

func (a *Adapter) List(ctx context.Context, prefix string) ([]filekit.File, error)

List implements filekit.FileSystem

func (*Adapter) Upload

func (a *Adapter) Upload(ctx context.Context, path string, content io.Reader, options ...filekit.Option) error

Upload implements filekit.FileSystem

func (*Adapter) UploadFile

func (a *Adapter) UploadFile(ctx context.Context, path string, localPath string, options ...filekit.Option) error

UploadFile implements filekit.Uploader

Jump to

Keyboard shortcuts

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