mirror of
https://github.com/restic/restic.git
synced 2024-12-25 01:06:39 +00:00
12 lines
267 B
Go
12 lines
267 B
Go
//go:build !linux && !darwin
|
|
// +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)
|
|
}
|