directory

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path string `mapstructure:"path"`
}

type Storage

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

func NewStorage

func NewStorage(cfg *Config) (*Storage, error)

func (*Storage) Delete

func (d *Storage) Delete(ctx context.Context, filePaths ...string) error

func (*Storage) Dirname

func (d *Storage) Dirname() string

func (*Storage) Exists

func (d *Storage) Exists(ctx context.Context, fileName string) (bool, error)

func (*Storage) GetCwd

func (d *Storage) GetCwd() string

func (*Storage) GetObject

func (d *Storage) GetObject(ctx context.Context, filePath string) (reader io.ReadCloser, err error)

func (*Storage) ListDir

func (d *Storage) ListDir(ctx context.Context) (files []string, dirs []storages.Storager, err error)

func (*Storage) PutObject

func (d *Storage) PutObject(ctx context.Context, filePath string, body io.Reader) error

func (*Storage) SubStorage

func (d *Storage) SubStorage(dp string, relative bool) storages.Storager

Jump to

Keyboard shortcuts

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