uploader

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRootDir = "/tmp/execit-uploads"

Variables

This section is empty.

Functions

This section is empty.

Types

type Uploader

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

func NewUploader

func NewUploader(rootDir string, disk string) (*Uploader, error)

func (*Uploader) AbsolutePath

func (u *Uploader) AbsolutePath(path string) string

func (*Uploader) AllDirectoryFiles

func (u *Uploader) AllDirectoryFiles(dir string) ([]contracts.FileInfo, error)

func (*Uploader) Delete

func (u *Uploader) Delete(path string) error

func (*Uploader) DeleteDir

func (u *Uploader) DeleteDir(dir string) error

func (*Uploader) DirExists

func (u *Uploader) DirExists(dir string) bool

func (*Uploader) DirSize

func (u *Uploader) DirSize(dir string) (int64, error)

func (*Uploader) Disk

func (u *Uploader) Disk(s string) contracts.Uploader

func (*Uploader) Exists

func (u *Uploader) Exists(path string) bool

func (*Uploader) MkDir

func (u *Uploader) MkDir(path string, recursive bool) error

func (*Uploader) NewFile added in v0.0.22

func (u *Uploader) NewFile(path string) (*os.File, error)

func (*Uploader) Put

func (u *Uploader) Put(path string, content io.Reader) (contracts.FileInfo, error)

func (*Uploader) RemoveEmptyDir

func (u *Uploader) RemoveEmptyDir(dir string) error

Jump to

Keyboard shortcuts

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