progress

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamEmpty liberr.CodeError = iota + liberr.MinPkgFileProgress
	ErrorSyscallRLimitGet
	ErrorSyscallRLimitSet
	ErrorIOFileStat
	ErrorIOFileSeek
	ErrorIOFileTruncate
	ErrorIOFileSync
	ErrorIOFileOpen
	ErrorIOFileTempNew
	ErrorIOFileTempClose
	ErrorIOFileTempRemove
	ErrorNilPointer
)
View Source
const DefaultBuffSize = 32 * 1024 // see io.copyBuffer

Variables

This section is empty.

Functions

This section is empty.

Types

type FctEOF

type FctEOF func()

type FctIncrement

type FctIncrement func(size int64)

type FctReset

type FctReset func(size, current int64)

type File

type File interface {
	CloseDelete() error

	Path() string
	Stat() (os.FileInfo, error)

	SizeBOF() (size int64, err error)
	SizeEOF() (size int64, err error)

	Truncate(size int64) error
	Sync() error
}

type Progress

type Progress interface {
	GenericIO
	File

	RegisterFctIncrement(fct FctIncrement)
	RegisterFctReset(fct FctReset)
	RegisterFctEOF(fct FctEOF)
	SetBufferSize(size int32)
	SetRegisterProgress(f Progress)

	Reset(max int64)
}

func Create

func Create(name string) (Progress, error)

func New

func New(name string, flags int, perm os.FileMode) (Progress, error)

func Open

func Open(name string) (Progress, error)

func Temp

func Temp(pattern string) (Progress, error)

func Unique

func Unique(basePath, pattern string) (Progress, error)

Jump to

Keyboard shortcuts

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