storage

package
v1.0.1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	*filesystem.Fllesystem
}

*

  • 文件管理器 *
  • @create 2021-9-8
  • @author deatil

func New

func New(adapters interfaces.Adapter, conf ...map[string]any) *Storage

new 文件管理器

func NewWithFllesystem

func NewWithFllesystem(fs *filesystem.Fllesystem) *Storage

new 文件管理器

func (*Storage) Append

func (this *Storage) Append(path string, data string, separator string) (bool, error)

尾部添加

func (*Storage) ConcatPathToUrl

func (this *Storage) ConcatPathToUrl(url string, path string) string

路径

func (*Storage) Exists

func (this *Storage) Exists(path string) bool

判断

func (*Storage) LastModified

func (this *Storage) LastModified(path string) (int64, error)

时间戳

func (*Storage) Missing

func (this *Storage) Missing(path string) bool

判断

func (*Storage) Path

func (this *Storage) Path(path string) string

路径

func (*Storage) Prepend

func (this *Storage) Prepend(path string, data string, separator string) (bool, error)

头部添加

func (*Storage) PutContentsAs

func (this *Storage) PutContentsAs(path string, contents string, name string, config ...map[string]any) (string, error)

保存文本数据

func (*Storage) PutFileAs

func (this *Storage) PutFileAs(path string, resource io.Reader, name string, config ...map[string]any) (string, error)

保存数据流

func (*Storage) Url

func (this *Storage) Url(url string) string

链接

Jump to

Keyboard shortcuts

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