Documentation ¶
Index ¶
- Constants
- type LocalBackend
- func (b *LocalBackend) Delete(filePath string) error
- func (b *LocalBackend) List(path string, recursive bool) ([]string, error)
- func (b *LocalBackend) Move(filePathSrc string, filePathDst string) error
- func (b *LocalBackend) Read(filePath string) ([]byte, error)
- func (b *LocalBackend) ReadStream(filePath string) (backend.FileStream, error)
- func (b *LocalBackend) ReadString(filePath string) (string, error)
- func (b *LocalBackend) Stat(filePath string) (backend.FileInfo, error)
- func (b *LocalBackend) Write(filePath string, data []byte) error
- func (b *LocalBackend) WriteStream(filePath string, stream io.ReadCloser, length int64) error
- func (b *LocalBackend) WriteString(filePath string, content string) error
- type LocalConfig
Constants ¶
View Source
const DEFAULT_MIME_TYPE = "application/octet-stream"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalBackend ¶
type LocalBackend struct { Config LocalConfig Mu sync.Mutex }
func New ¶
func New(config LocalConfig) (*LocalBackend, error)
func (*LocalBackend) Delete ¶
func (b *LocalBackend) Delete(filePath string) error
func (*LocalBackend) List ¶
func (b *LocalBackend) List(path string, recursive bool) ([]string, error)
func (*LocalBackend) Move ¶
func (b *LocalBackend) Move(filePathSrc string, filePathDst string) error
func (*LocalBackend) ReadStream ¶
func (b *LocalBackend) ReadStream(filePath string) (backend.FileStream, error)
func (*LocalBackend) ReadString ¶
func (b *LocalBackend) ReadString(filePath string) (string, error)
func (*LocalBackend) WriteStream ¶
func (b *LocalBackend) WriteStream(filePath string, stream io.ReadCloser, length int64) error
func (*LocalBackend) WriteString ¶
func (b *LocalBackend) WriteString(filePath string, content string) error
type LocalConfig ¶
Click to show internal directories.
Click to hide internal directories.