Skip to content

Commit

Permalink
feat: add UseCumulativeSize UnixfsLs option (#95)
Browse files Browse the repository at this point in the history
This commit was moved from ipfs/interface-go-ipfs-core@b1299ab

This commit was moved from ipfs/boxo@ff2eb2b
  • Loading branch information
hacdias authored Dec 12, 2022
1 parent 46577b1 commit d2edb2e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/coreiface/options/unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ type UnixfsAddSettings struct {
}

type UnixfsLsSettings struct {
ResolveChildren bool
ResolveChildren bool
UseCumulativeSize bool
}

type UnixfsAddOption func(*UnixfsAddSettings) error
Expand Down Expand Up @@ -283,3 +284,10 @@ func (unixfsOpts) ResolveChildren(resolve bool) UnixfsLsOption {
return nil
}
}

func (unixfsOpts) UseCumulativeSize(use bool) UnixfsLsOption {
return func(settings *UnixfsLsSettings) error {
settings.UseCumulativeSize = use
return nil
}
}

0 comments on commit d2edb2e

Please sign in to comment.