local

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *Config) flysystem.IAdapter

Types

type Config added in v0.3.2

type Config struct {
	Root string `json:"root" xml:"Root" yaml:"Root"`
	CDN  string `json:"cdn" xml:"CDN" yaml:"CDN"`
}

func (*Config) New added in v0.3.2

func (c *Config) New() flysystem.IAdapter

type Local

type Local struct {
	gfs.AbstractAdapter

	CDN string
	// contains filtered or unexported fields
}

func NewLocal added in v0.3.2

func NewLocal(config *Config) *Local

func (*Local) Copy

func (f *Local) Copy(source, destination string) (bool, error)

func (*Local) Delete

func (f *Local) Delete(path string) (int64, error)

func (Local) DiskName

func (f Local) DiskName() string

func (*Local) Exists

func (f *Local) Exists(path string) (bool, error)

func (*Local) GFSAdapter added in v0.3.0

func (f *Local) GFSAdapter() gfs.IAdapter

func (*Local) MimeType

func (f *Local) MimeType(path string) (string, error)

func (*Local) Move

func (f *Local) Move(source, destination string) (bool, error)

func (*Local) Read

func (f *Local) Read(path string) ([]byte, error)

func (*Local) Size

func (f *Local) Size(path string) (int64, error)

func (*Local) URL added in v0.1.2

func (f *Local) URL(path string) (*url.URL, error)

func (*Local) Update

func (f *Local) Update(path string, contents []byte) (string, error)

func (*Local) UpdateStream

func (f *Local) UpdateStream(path, resource string) (string, error)

func (*Local) Write

func (f *Local) Write(path string, contents []byte) (string, error)

func (*Local) WriteReader added in v0.0.2

func (f *Local) WriteReader(path string, reader io.Reader) (string, error)

func (*Local) WriteStream

func (f *Local) WriteStream(path, resource string) (string, error)

Jump to

Keyboard shortcuts

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