fix: 修复写队列 busy 恢复、关闭安全、备份与配置构建问题
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
//go:build windows
|
||||
|
||||
package store
|
||||
|
||||
import "golang.org/x/sys/windows"
|
||||
|
||||
func availableBytes(path string) (uint64, error) {
|
||||
p, err := windows.UTF16PtrFromString(path)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
var free, total, totalFree uint64
|
||||
if err := windows.GetDiskFreeSpaceEx(p, &free, &total, &totalFree); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return free, nil
|
||||
}
|
||||
Reference in New Issue
Block a user