feat: add UseCumulativeSize UnixfsLs option (#95)
This commit was moved from ipfs/interface-go-ipfs-core@b1299abda0c69529c7efa02d5efb9f8905fdd4fe This commit was moved from ipfs/boxo@ff2eb2bff265f34012cca335447987da546ecee2
Henrique Dias committed
Dec 12, 2022 at 21:09 UTC
d2edb2ea7859d83a501c455ae054350c3622b83b
1 file changed
+9
-1
core/coreiface/options/unixfs.go
+9
-1
@@ -39,7 +39,8 @@ type UnixfsAddSettings struct {
39
}
40
41
type UnixfsLsSettings struct {
42
- ResolveChildren bool
42
+ ResolveChildren bool
43
+ UseCumulativeSize bool
44
}
45
46
type UnixfsAddOption func(*UnixfsAddSettings) error
@@ -283,3 +284,10 @@ func (unixfsOpts) ResolveChildren(resolve bool) UnixfsLsOption {
284
return nil
285
}
286
}
287
+
288
+func (unixfsOpts) UseCumulativeSize(use bool) UnixfsLsOption {
289
+ return func(settings *UnixfsLsSettings) error {
290
+ settings.UseCumulativeSize = use
291
+ return nil
292
+ }
293
+}