ollama/server/sparse_common.go
Daniel Hiltgen fc85f50a2b Ensure sparse files on windows during download
The file.Truncate call on windows will write the whole file
unless you set the sparse flag, leading to heavy I/O at the
beginning of download.  This should improve our
I/O behavior on windows and put less stress on the users disk.
2024-08-06 10:58:08 -07:00

9 lines
102 B
Go

//go:build !windows
package server
import "os"
func setSparse(file *os.File) error {
return nil
}