filesystem

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 9 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystem

type FileSystem struct {
	Base string
}

FileSystem file system storage

func New

func New(base string) *FileSystem

New initialize FileSystem storage

func (FileSystem) Delete

func (fileSystem FileSystem) Delete(ctx context.Context, path string) error

Delete delete file

func (FileSystem) Get

func (fileSystem FileSystem) Get(ctx context.Context, path string) (*os.File, error)

Get receive file with given path

func (FileSystem) GetEndpoint

func (fileSystem FileSystem) GetEndpoint(ctx context.Context) string

GetEndpoint get endpoint, FileSystem's endpoint is /

func (FileSystem) GetStream

func (fileSystem FileSystem) GetStream(ctx context.Context, path string) (io.ReadCloser, error)

GetStream get file as stream

func (FileSystem) GetURL

func (fileSystem FileSystem) GetURL(ctx context.Context, path string) (url string, err error)

GetURL get public accessible URL

func (FileSystem) List

func (fileSystem FileSystem) List(ctx context.Context, path string) ([]*oss.Object, error)

List list all objects under current path

func (FileSystem) Put

func (fileSystem FileSystem) Put(ctx context.Context, path string, reader io.Reader) (*oss.Object, error)

Put store a reader into given path

Jump to

Keyboard shortcuts

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