Documentation
¶
Index ¶
- Variables
- func Copy(ctx context.Context, srcFS FS, src, dst string, metas ...Meta) error
- func CopyDir(ctx context.Context, srcFS FS, src, dst string) error
- func CopyFile(ctx context.Context, srcFS FS, src, dst string) error
- func Exists(driver string) bool
- func NewMeta(metas ...Meta) *meta
- func Register(typ string, creator OptionCreator)
- func Verify(driver string, option string) error
- func WalkDir(ctx context.Context, srcFS FS, root string, walkDirFn WalkDirFunc) error
- type Base
- func (Base) Close() error
- func (Base) Copy(context.Context, string, string) error
- func (Base) Create(string) (FileWriter, error)
- func (Base) Get(context.Context, string) (File, error)
- func (Base) List(context.Context, string, ...Meta) ([]File, error)
- func (Base) MakeDir(context.Context, string) error
- func (Base) Move(context.Context, string, string) error
- func (Base) Open(string) (FileReader, error)
- func (Base) Remove(context.Context, string) error
- func (Base) Rename(context.Context, string, string) error
- type FS
- type File
- type FileInfo
- type FileReader
- type FileWriter
- type Meta
- type Option
- type OptionCreator
- type WalkDirFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOption = errors.New("driver's option err") ErrNotSupport = errors.New("operate not support") ErrSrcNotExist = errors.New("src is not exists") ErrDstNotExist = errors.New("dst is not exists") ErrDstIsExist = errors.New("dst already exists") ErrDriverNotExist = errors.New("driver is not exists") ErrOpenDirectory = errors.New("can't open a directory") VerifyOption = util.VerifyOption )
Functions ¶
func Register ¶
func Register(typ string, creator OptionCreator)
Types ¶
type FS ¶
type FS interface { List(context.Context, string, ...Meta) ([]File, error) Move(context.Context, string, string) error Copy(context.Context, string, string) error Rename(context.Context, string, string) error Remove(context.Context, string) error MakeDir(context.Context, string) error Get(context.Context, string) (File, error) Open(string) (FileReader, error) Create(string) (FileWriter, error) Close() error }
type FileInfo ¶
type FileReader ¶
type FileReader interface { io.Seeker io.ReadCloser }
func NewFileReader ¶
func NewFileReader(size int64, rangeFunc func(int64, int64) (io.ReadCloser, error)) (FileReader, error)
type FileWriter ¶
type FileWriter interface { io.WriteCloser }
type Meta ¶
type Meta func(*meta)
func WithAutoRename ¶
func WithOverride ¶
func WithPagination ¶
func WithPassword ¶
type OptionCreator ¶
type OptionCreator func() Option
Click to show internal directories.
Click to hide internal directories.