Documentation ¶
Index ¶
Constants ¶
View Source
const MaxBufferSize int = 512
Will ChunkyCopy in chunks this size at max.
Variables ¶
View Source
var CopyDirError = errors.New("cannot operate on dir, see CopyOperation.Copy")
Functions ¶
func ChunkyCopy ¶
The raw copy function. Opens [src], creates [dst] (overwriting whatever is there with an empty file) and copies bytes in chunks of [bufsize] until complete.
Types ¶
type CopyOperation ¶
type CopyOperation struct {
// contains filtered or unexported fields
}
func New ¶
func New(src, dst string) *CopyOperation
func (*CopyOperation) Copy ¶
func (co *CopyOperation) Copy(overwrite bool) error
Accounts for directories - when we are sure that we're handling regular files, Copy takes over.
func (*CopyOperation) Destination ¶
func (co *CopyOperation) Destination() string
func (*CopyOperation) From ¶
func (co *CopyOperation) From(path string) *CopyOperation
func (*CopyOperation) Source ¶
func (co *CopyOperation) Source() string
func (CopyOperation) String ¶
func (co CopyOperation) String() string
func (*CopyOperation) To ¶
func (co *CopyOperation) To(path string) *CopyOperation
Click to show internal directories.
Click to hide internal directories.