Documentation ¶
Index ¶
- Constants
- type Filesystem
- func (f *Filesystem) Close() error
- func (f *Filesystem) Delete(dstFile string) error
- func (f *Filesystem) DeleteDir(dstDir string) error
- func (f *Filesystem) ErrIsNotExist(err error) bool
- func (f *Filesystem) Exists(file string) (bool, error)
- func (f *Filesystem) FileDir(subpath string) string
- func (f *Filesystem) FileInfo(file string) (os.FileInfo, error)
- func (f *Filesystem) FixURL(content string, embedded ...bool) string
- func (f *Filesystem) Get(dstFile string) (io.ReadCloser, error)
- func (f *Filesystem) Move(src, dst string) error
- func (f *Filesystem) Name() string
- func (f *Filesystem) Put(dstFile string, src io.Reader, size int64) (savePath string, viewURL string, err error)
- func (f *Filesystem) SendFile(ctx echo.Context, file string) error
Constants ¶
View Source
const Name = `s3`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filesystem ¶
type Filesystem struct { *local.Filesystem // contains filtered or unexported fields }
Filesystem 文件系统存储引擎
func NewFilesystem ¶
func NewFilesystem(ctx context.Context, subdir string) (*Filesystem, error)
func (*Filesystem) DeleteDir ¶
func (f *Filesystem) DeleteDir(dstDir string) error
DeleteDir 删除文件夹及其内部文件
func (*Filesystem) ErrIsNotExist ¶
func (f *Filesystem) ErrIsNotExist(err error) bool
func (*Filesystem) FileInfo ¶
func (f *Filesystem) FileInfo(file string) (os.FileInfo, error)
FileInfo 获取文件信息
func (*Filesystem) FixURL ¶
func (f *Filesystem) FixURL(content string, embedded ...bool) string
FixURL 改写文件网址
func (*Filesystem) Get ¶
func (f *Filesystem) Get(dstFile string) (io.ReadCloser, error)
Get 获取文件读取接口
Click to show internal directories.
Click to hide internal directories.