sparse_windows.go 226 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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,
	)
}