fs

package
v1.8.1-0...-0157f87 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetryableError

func IsRetryableError(err error) bool

Types

type Config

type Config struct {
	Path string `bson:"path" json:"path" yaml:"path"`
}

func (*Config) Cast

func (cfg *Config) Cast() error

func (*Config) Clone

func (cfg *Config) Clone() *Config

func (*Config) Equal

func (cfg *Config) Equal(other *Config) bool

type FS

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

func New

func New(opts *Config) (*FS, error)

func (*FS) Copy added in v1.6.0

func (fs *FS) Copy(src, dst string) error

func (*FS) Delete

func (fs *FS) Delete(name string) error

Delete deletes given file from FS. It returns storage.ErrNotExist if a file isn't exists

func (*FS) FileStat added in v1.4.0

func (fs *FS) FileStat(name string) (storage.FileInfo, error)

func (*FS) List added in v1.3.0

func (fs *FS) List(prefix, suffix string) ([]storage.FileInfo, error)

func (*FS) Save

func (fs *FS) Save(name string, data io.Reader, _ int64) error

func (*FS) SourceReader

func (fs *FS) SourceReader(name string) (io.ReadCloser, error)

func (*FS) Type

func (*FS) Type() storage.Type

type RetryableError

type RetryableError struct {
	Err error
}

func (*RetryableError) Error

func (e *RetryableError) Error() string

Jump to

Keyboard shortcuts

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