mirror of https://gitee.com/namelin2022/ollama
committed by
GitHub
3 changed files with 28 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||||
|
//go:build !windows
|
||||
|
|
||||
|
package server |
||||
|
|
||||
|
import "os" |
||||
|
|
||||
|
func setSparse(file *os.File) error { |
||||
|
return nil |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package server |
||||
|
|
||||
|
import ( |
||||
|
"os" |
||||
|
|
||||
|
"golang.org/x/sys/windows" |
||||
|
) |
||||
|
|
||||
|
func setSparse(file *os.File) error { |
||||
|
return windows.DeviceIoControl( |
||||
|
windows.Handle(file.Fd()), windows.FSCTL_SET_SPARSE, |
||||
|
nil, 0, |
||||
|
nil, 0, |
||||
|
nil, nil, |
||||
|
) |
||||
|
} |
||||
Loading…
Reference in new issue