1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-27 18:28:30 +00:00
restic/internal/restorer/preallocate_other.go
2020-09-07 21:41:47 +02:00

11 lines
238 B
Go

// +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)
}