lib

package
v2.0.0-...-bd8bb20 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT, MIT Imports: 7 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 {
	Init(params string) error
	SetWorkingDir(path string) error
	WorkingDir() string
	Touch(path string) error
	WriteJson(path string, content any) error
	Write(path string, content any) error
	Append(path string, content any) error
	SetMetadata(path string, meta Metadata) error
	GetMetadata(path string) (*Metadata, error)
	CopyDir(src, dest string) error
	CopyFile(src, dest string) error
	Stat(path string) (FileInfo, error)
	IsFileExists(path string) bool
	IsDirExists(path string) bool
	IsDir(path string) bool
	ReadAll(path string) ([]byte, error)
	ReadAllString(path string) (string, error)
	Mkdir(path string, perm ...fs.FileMode) error
	MkdirAll(path string, perm ...fs.FileMode) error
	Remove(path string) error
	RemoveAll(path string) error
	List(path string, recursive ...bool) ([]FileInfo, error)
	Search(match string) ([]FileInfo, error)
	Name() string
	SetName(name string)
	Type() string
}

type FileInfo

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

func NewFileInfo

func NewFileInfo(path string, size int64, mode fs.FileMode, modTime time.Time, isDir bool, sys any, storage Driver) FileInfo

func (FileInfo) Append

func (f FileInfo) Append(content any) error

func (FileInfo) Dir

func (f FileInfo) Dir() string

func (FileInfo) Extension

func (f FileInfo) Extension() string

func (FileInfo) IsDir

func (f FileInfo) IsDir() bool

func (FileInfo) ModTime

func (f FileInfo) ModTime() time.Time

func (FileInfo) Mode

func (f FileInfo) Mode() fs.FileMode

func (FileInfo) Name

func (f FileInfo) Name() string

func (FileInfo) Path

func (f FileInfo) Path() string

func (FileInfo) Remove

func (f FileInfo) Remove() error

func (FileInfo) RemoveDir

func (f FileInfo) RemoveDir() error

func (FileInfo) Size

func (f FileInfo) Size() int64

func (FileInfo) Sys

func (f FileInfo) Sys() any

func (FileInfo) Touch

func (f FileInfo) Touch() error

func (FileInfo) Write

func (f FileInfo) Write(content any) error

type Metadata

type Metadata map[string]string

type StorageSettings

type StorageSettings string

func (StorageSettings) Parse

func (s StorageSettings) Parse(input string) (map[string]string, error)

Jump to

Keyboard shortcuts

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