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:
@@ -18,7 +18,9 @@ func copyFileInfo(fi os.FileInfo, name string) error {
|
||||
}
|
||||
|
||||
func copyFileContent(dst, src *os.File) error {
|
||||
_, err := io.Copy(dst, src)
|
||||
buf := bufferPool.Get().([]byte)
|
||||
_, err := io.CopyBuffer(dst, src, buf)
|
||||
bufferPool.Put(buf)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user