diff --git a/storage/sealer/fsutil/filesize_unix.go b/storage/sealer/fsutil/filesize_unix.go index 9c7f04ace..3d80e0b8a 100644 --- a/storage/sealer/fsutil/filesize_unix.go +++ b/storage/sealer/fsutil/filesize_unix.go @@ -1,3 +1,6 @@ +//go:build !windows +// +build !windows + package fsutil import ( diff --git a/storage/sealer/fsutil/filesize_windows.go b/storage/sealer/fsutil/filesize_windows.go new file mode 100644 index 000000000..aeef50473 --- /dev/null +++ b/storage/sealer/fsutil/filesize_windows.go @@ -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") +}