Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Copier ¶
type Copier interface { Context() Context SetContext(ctx Context) Copy(wp *WriteProgress) error BytesWritten() uint64 Dest() string DebugPrint() string }
func MakeCopierFromString ¶
type HTTPFile ¶
type HTTPFile struct {
// contains filtered or unexported fields
}
func (*HTTPFile) BytesWritten ¶
func (*HTTPFile) Copy ¶
func (f *HTTPFile) Copy(wp *WriteProgress) error
func (*HTTPFile) DebugPrint ¶
func (*HTTPFile) SetContext ¶
type LocalFile ¶
type LocalFile struct {
// contains filtered or unexported fields
}
func (*LocalFile) BytesWritten ¶
func (*LocalFile) Copy ¶
func (f *LocalFile) Copy(wp *WriteProgress) error
func (*LocalFile) DebugPrint ¶
func (*LocalFile) SetContext ¶
type WriteProgress ¶
type WriteProgress struct {
// contains filtered or unexported fields
}
WriteProgress counts the number of bytes written to it. It implements to the io.Writer (and thus goes well with io.TeeReader). If freq time has passed, then it calls the given func.
func NewWriteProgress ¶
func NewWriteProgress(freq time.Duration, fn func(uint64, uint64)) WriteProgress
func (*WriteProgress) BytesWritten ¶
func (wp *WriteProgress) BytesWritten() uint64
func (*WriteProgress) SetGoal ¶
func (wp *WriteProgress) SetGoal(n uint64)
Click to show internal directories.
Click to hide internal directories.