mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-09 10:18:04 +08:00
rename DataSize to FileSize
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
This commit is contained in:
parent
9796a03624
commit
bb986ebf4c
@ -105,7 +105,7 @@ func (n *UnixfsNode) GetChild(ctx context.Context, i int, ds dag.DAGService) (*U
|
||||
// the passed in DagBuilderHelper is used to store the child node an
|
||||
// pin it locally so it doesnt get lost
|
||||
func (n *UnixfsNode) AddChild(child *UnixfsNode, db *DagBuilderHelper) error {
|
||||
n.ufmt.AddBlockSize(child.DataSize())
|
||||
n.ufmt.AddBlockSize(child.FileSize())
|
||||
|
||||
childnode, err := child.GetDagNode()
|
||||
if err != nil {
|
||||
@ -137,7 +137,7 @@ func (n *UnixfsNode) SetData(data []byte) {
|
||||
n.ufmt.Data = data
|
||||
}
|
||||
|
||||
func (n *UnixfsNode) DataSize() uint64 {
|
||||
func (n *UnixfsNode) FileSize() uint64 {
|
||||
if n.raw {
|
||||
return uint64(len(n.rawnode.RawData()))
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user