2022-03-28 20:23:47 +00:00
|
|
|
//go:build !linux && !darwin
|
2020-08-15 15:45:05 +00:00
|
|
|
// +build !linux,!darwin
|
|
|
|
|
|
|
|
package restorer
|
|
|
|
|
|
|
|
import "os"
|
|
|
|
|
|
|
|
func preallocateFile(wr *os.File, size int64) error {
|
|
|
|
// Maybe truncate can help?
|
|
|
|
// Windows: This calls SetEndOfFile which preallocates space on disk
|
|
|
|
return wr.Truncate(size)
|
|
|
|
}
|