mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-09 10:18:04 +08:00
feat: add UseCumulativeSize UnixfsLs option (#95)
This commit was moved from ipfs/interface-go-ipfs-core@b1299abda0 This commit was moved from ipfs/boxo@ff2eb2bff2
This commit is contained in:
parent
46577b15b7
commit
d2edb2ea78
@ -39,7 +39,8 @@ type UnixfsAddSettings struct {
|
||||
}
|
||||
|
||||
type UnixfsLsSettings struct {
|
||||
ResolveChildren bool
|
||||
ResolveChildren bool
|
||||
UseCumulativeSize bool
|
||||
}
|
||||
|
||||
type UnixfsAddOption func(*UnixfsAddSettings) error
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user