@cryptotaxi247 / kubo / commits / bb986ebf4

rename DataSize to FileSize

License: MIT Signed-off-by: Jeromy <why@ipfs.io>

Jeromy committed Oct 19, 2016 at 11:17 UTC bb986ebf4c2be6d0906dd82c68811c11f98e25d6
1 file changed +2 -2
importer/helpers/helpers.go
+2 -2
@@ -105,7 +105,7 @@ func (n *UnixfsNode) GetChild(ctx context.Context, i int, ds dag.DAGService) (*U
105 // the passed in DagBuilderHelper is used to store the child node an
106 // pin it locally so it doesnt get lost
107 func (n *UnixfsNode) AddChild(child *UnixfsNode, db *DagBuilderHelper) error {
108 - n.ufmt.AddBlockSize(child.DataSize())
108 + n.ufmt.AddBlockSize(child.FileSize())
109
110 childnode, err := child.GetDagNode()
111 if err != nil {
@@ -137,7 +137,7 @@ func (n *UnixfsNode) SetData(data []byte) {
137 n.ufmt.Data = data
138 }
139
140 -func (n *UnixfsNode) DataSize() uint64 {
140 +func (n *UnixfsNode) FileSize() uint64 {
141 if n.raw {
142 return uint64(len(n.rawnode.RawData()))
143 }