filesystem

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	AllDirectories(path string) ([]string, error)
	AllFiles(path string) ([]string, error)
	Copy(oldFile, newFile string) error
	Delete(file ...string) error
	DeleteDirectory(directory string) error
	Directories(path string) ([]string, error)
	Exists(file string) bool
	Files(path string) ([]string, error)
	Get(file string) (string, error)
	LastModified(file string) (time.Time, error)
	MakeDirectory(directory string) error
	MimeType(file string) (string, error)
	Missing(file string) bool
	Move(oldFile, newFile string) error
	Path(file string) string
	Put(file, content string) error
	PutFile(path string, source File) (string, error)
	PutFileAs(path string, source File, name string) (string, error)
	Size(file string) (int64, error)
	TemporaryUrl(file string, time time.Time) (string, error)
	WithContext(ctx context.Context) Driver
	Url(file string) string
}

type File

type File interface {
	Disk(disk string) File
	Extension() (string, error)
	File() string
	GetClientOriginalName() string
	GetClientOriginalExtension() string
	HashName(path ...string) string
	LastModified() (time.Time, error)
	MimeType() (string, error)
	Size() (int64, error)
	Store(path string) (string, error)
	StoreAs(path string, name string) (string, error)
}

type Storage

type Storage interface {
	Driver
	Disk(disk string) Driver
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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