linux

package
v1.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRealPath

func GetRealPath(dir string) string

GetRealPath gets real path of a directory

func IsDirectoryOrObject

func IsDirectoryOrObject(path string) bool

IsDirectoryOrObject checks if is a directory or an object

func ListTempFiles

func ListTempFiles(dir string, isRec bool) []string

ListTempFiles lists objects under a prefix

Types

type FileAttrs

type FileAttrs struct {
	FullPath     string
	RelativePath string
	Name         string
	Size         int64
	CRC32C       uint32
	ModTime      time.Time
}

FileAttrs holds attributes of a file

type Linux

type Linux struct {
}

func (*Linux) Attributes

func (l *Linux) Attributes(bucket, prefix string) *system.Attrs

func (*Linux) BatchAttributes

func (l *Linux) BatchAttributes(bucket, prefix string, recursive bool) []*system.Attrs

func (*Linux) Cat

func (l *Linux) Cat(bucket, path string) []byte

OutputObject outputs an object

func (*Linux) Copy

func (l *Linux) Copy(srcBucket, srcPath, dstBucket, dstPath string)

CopyObject copies an object

func (*Linux) Delete

func (l *Linux) Delete(bucket, prefix string)

DeleteObject deletes an object

func (*Linux) DiskUsage

func (l *Linux) DiskUsage(bucket, prefix string, recursive bool) []system.DiskUsage

GetDiskUsageObjects gets disk usage of objects under a prefix

func (*Linux) Download

func (l *Linux) Download(
	bucket, prefix, dstFile string,
	forceChecksum bool,
	ctx system.RunContext,
)

func (*Linux) IsDirectory

func (l *Linux) IsDirectory(bucket, path string) bool

IsDirectory checks if is a directory

func (*Linux) IsObject

func (l *Linux) IsObject(bucket, path string) bool

IsObject checks if is an object

func (*Linux) List

func (l *Linux) List(bucket, prefix string, isRec bool) []*system.FileObject

ListObjects lists objects under a prefix

func (*Linux) Move

func (l *Linux) Move(srcBucket, srcPath, dstBucket, dstPath string)

MoveObject moves an object

func (*Linux) Scheme

func (l *Linux) Scheme() string

func (*Linux) Upload

func (l *Linux) Upload(srcFile, bucket, object string, ctx system.RunContext)

Jump to

Keyboard shortcuts

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