Merge pull request #10035 from aschmahmann/fix/filesize-prevents-windows-lib

fix: sealing: stub out the FileSize function on Windows
This commit is contained in:
Łukasz Magiera 2023-01-17 12:48:38 +01:00 committed by GitHub
commit 2d3f1e0365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,6 @@
//go:build !windows
// +build !windows
package fsutil package fsutil
import ( import (

View File

@ -0,0 +1,16 @@
package fsutil
import (
"fmt"
)
type SizeInfo struct {
OnDisk int64
}
// FileSize returns bytes used by a file or directory on disk
// NOTE: We care about the allocated bytes, not file or directory size
// This is not currently supported on Windows, but at least other lotus can components can build on Windows now
func FileSize(path string) (SizeInfo, error) {
return SizeInfo{0}, fmt.Errorf("unsupported")
}