mirror of
https://github.com/octoleo/restic.git
synced 2024-11-29 16:23:59 +00:00
12 lines
238 B
Go
12 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)
|
||
|
}
|