提交 bb986ebf 作者: Jeromy

rename DataSize to FileSize

License: MIT
Signed-off-by: 's avatarJeromy <why@ipfs.io>
上级 9796a036
...@@ -105,7 +105,7 @@ func (n *UnixfsNode) GetChild(ctx context.Context, i int, ds dag.DAGService) (*U ...@@ -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 // the passed in DagBuilderHelper is used to store the child node an
// pin it locally so it doesnt get lost // pin it locally so it doesnt get lost
func (n *UnixfsNode) AddChild(child *UnixfsNode, db *DagBuilderHelper) error { func (n *UnixfsNode) AddChild(child *UnixfsNode, db *DagBuilderHelper) error {
n.ufmt.AddBlockSize(child.DataSize()) n.ufmt.AddBlockSize(child.FileSize())
childnode, err := child.GetDagNode() childnode, err := child.GetDagNode()
if err != nil { if err != nil {
...@@ -137,7 +137,7 @@ func (n *UnixfsNode) SetData(data []byte) { ...@@ -137,7 +137,7 @@ func (n *UnixfsNode) SetData(data []byte) {
n.ufmt.Data = data n.ufmt.Data = data
} }
func (n *UnixfsNode) DataSize() uint64 { func (n *UnixfsNode) FileSize() uint64 {
if n.raw { if n.raw {
return uint64(len(n.rawnode.RawData())) return uint64(len(n.rawnode.RawData()))
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论