op

package
v0.0.0-...-33b86ef Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WORK     = "work"
	RootName = "root"
)

Variables

This section is empty.

Functions

func ClearCache

func ClearCache(storage driver.Driver, path string)

func Copy

func Copy(ctx context.Context, storage driver.Driver, srcPath, dstDirPath string, lazyCache ...bool) error

Copy Just copy file[s] in a storage

func Get

func Get(ctx context.Context, storage driver.Driver, path string) (model.Obj, error)

Get object from list of files

func GetDriverInfoMap

func GetDriverInfoMap() map[string][]driver.Item
func GetDriverInfoMap() map[string]driver.Info {
	return driverInfoMap
}

func GetDriverNames

func GetDriverNames() []string

func GetUnwrap

func GetUnwrap(ctx context.Context, storage driver.Driver, path string) (model.Obj, error)

func Key

func Key(storage driver.Driver, path string) string
func Link(ctx context.Context, storage driver.Driver, path string, args model.LinkArgs) (*model.Link, model.Obj, error)

Link get link, if is an url. should have an expiry time

func List

func List(ctx context.Context, storage driver.Driver, path string, args model.ListArgs, refresh ...bool) ([]model.Obj, error)

List files in storage, not contains virtual file

func MakeDir

func MakeDir(ctx context.Context, storage driver.Driver, path string, lazyCache ...bool) error

func Move

func Move(ctx context.Context, storage driver.Driver, srcPath, dstDirPath string, lazyCache ...bool) error

func Other

func Other(ctx context.Context, storage driver.Driver, args model.FsOtherArgs) (interface{}, error)

Other api

func Put

func Put(ctx context.Context, storage driver.Driver, dstDirPath string, file *model.FileStream, up driver.UpdateProgress, lazyCache ...bool) error

func RegisterDriver

func RegisterDriver(driver New)

func Remove

func Remove(ctx context.Context, storage driver.Driver, path string) error

func Rename

func Rename(ctx context.Context, storage driver.Driver, srcPath, dstName string, lazyCache ...bool) error

Types

type New

type New func() driver.Driver

func GetDriverNew

func GetDriverNew(name string) (New, error)

Jump to

Keyboard shortcuts

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