1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-24 00:37:28 +00:00
restic/internal/fs/preallocate_other.go
2023-06-09 11:49:06 +03:00

12 lines
261 B
Go

//go:build !linux && !darwin
// +build !linux,!darwin
package fs
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)
}