adapter

package
v1.0.1010 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Abstract

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

*

  • 通用基类 *
  • @create 2021-8-1
  • @author deatil

func (*Abstract) ApplyPathPrefix

func (this *Abstract) ApplyPathPrefix(path string) string

添加前缀

func (*Abstract) GetPathPrefix

func (this *Abstract) GetPathPrefix() string

获取前缀

func (*Abstract) RemovePathPrefix

func (this *Abstract) RemovePathPrefix(path string) string

移除前缀

func (*Abstract) SetPathPrefix

func (this *Abstract) SetPathPrefix(prefix string)

设置前缀

type Adapter

type Adapter struct {
	Abstract
}

*

  • 空适配器 *
  • @create 2021-8-1
  • @author deatil

func (*Adapter) Copy

func (this *Adapter) Copy(path string, newpath string) error

复制

func (*Adapter) CreateDir

func (this *Adapter) CreateDir(dirname string, conf interfaces.Config) (map[string]string, error)

创建文件夹

func (*Adapter) Delete

func (this *Adapter) Delete(path string) error

删除

func (*Adapter) DeleteDir

func (this *Adapter) DeleteDir(dirname string) error

删除文件夹

func (*Adapter) GetMetadata

func (this *Adapter) GetMetadata(path string) (map[string]any, error)

func (*Adapter) GetMimetype

func (this *Adapter) GetMimetype(path string) (map[string]any, error)

func (*Adapter) GetSize

func (this *Adapter) GetSize(path string) (map[string]any, error)

func (*Adapter) GetTimestamp

func (this *Adapter) GetTimestamp(path string) (map[string]any, error)

func (*Adapter) GetVisibility

func (this *Adapter) GetVisibility(path string) (map[string]string, error)

获取文件的权限

func (*Adapter) Has

func (this *Adapter) Has(string) bool

判断

func (*Adapter) ListContents

func (this *Adapter) ListContents(directory string, recursive ...bool) ([]map[string]any, error)

列出内容

func (*Adapter) Read

func (this *Adapter) Read(path string) (map[string]any, error)

读取

func (*Adapter) ReadStream

func (this *Adapter) ReadStream(path string) (map[string]any, error)

读取数据为数据流

func (*Adapter) Rename

func (this *Adapter) Rename(path string, newpath string) error

重命名

func (*Adapter) SetVisibility

func (this *Adapter) SetVisibility(path string, visibility string) (map[string]string, error)

设置文件的权限

func (*Adapter) Update

func (this *Adapter) Update(path string, contents []byte, conf interfaces.Config) (map[string]any, error)

更新

func (*Adapter) UpdateStream

func (this *Adapter) UpdateStream(path string, stream io.Reader, conf interfaces.Config) (map[string]any, error)

更新

func (*Adapter) Write

func (this *Adapter) Write(path string, contents []byte, conf interfaces.Config) (map[string]any, error)

上传

func (*Adapter) WriteStream

func (this *Adapter) WriteStream(path string, stream io.Reader, conf interfaces.Config) (map[string]any, error)

上传 Stream 文件类型

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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