1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-29 11:16:31 +00:00
restic/internal/restorer/preallocate_other.go

13 lines
267 B
Go
Raw Normal View History

2022-03-28 20:23:47 +00:00
//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)
}