Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
feat: add UseCumulativeSize UnixfsLs option (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias authored Dec 12, 2022
1 parent 062477f commit b1299ab
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 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 b1299ab

Please sign in to comment.