fix: stub out the FileSize command so lotus libraries can build on Windows

This commit is contained in:
Adin Schmahmann 2023-01-17 01:03:10 -05:00
parent 34576d0c64
commit d35818293a
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,6 @@
//go:build !windows
// +build !windows
package fsutil
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")
}