Skip to content

Commit f8baed5

Browse files
authored
feat: add UseCumulativeSize UnixfsLs option (#95)
This commit was moved from ipfs/interface-go-ipfs-core@b1299ab
1 parent 3a6d259 commit f8baed5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

coreiface/options/unixfs.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ type UnixfsAddSettings struct {
3939
}
4040

4141
type UnixfsLsSettings struct {
42-
ResolveChildren bool
42+
ResolveChildren bool
43+
UseCumulativeSize bool
4344
}
4445

4546
type UnixfsAddOption func(*UnixfsAddSettings) error
@@ -283,3 +284,10 @@ func (unixfsOpts) ResolveChildren(resolve bool) UnixfsLsOption {
283284
return nil
284285
}
285286
}
287+
288+
func (unixfsOpts) UseCumulativeSize(use bool) UnixfsLsOption {
289+
return func(settings *UnixfsLsSettings) error {
290+
settings.UseCumulativeSize = use
291+
return nil
292+
}
293+
}

0 commit comments

Comments
 (0)