Use copy file range from sysx
Use pooled buffers for copy Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
@@ -4,10 +4,19 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var (
|
||||
bufferPool = &sync.Pool{
|
||||
New: func() interface{} {
|
||||
return make([]byte, 32*1024)
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// CopyDirectory copies the directory from src to dst.
|
||||
// Most efficient copy of files is attempted.
|
||||
func CopyDirectory(dst, src string) error {
|
||||
|
||||
Reference in New Issue
Block a user