Skip to content

CoreAPI: ObjectStat and DataSize #5325

Open
@djdv

Description

@djdv

When trying to migrate data out of IPFS with the CoreAPI, I noticed that an ObjectStat's DataSize member, is the size for the object's entire data segment, not just the size of the raw data stored under the type/format.
For example, current UnixFS nodes storing the data "IPFS", will be larger than 4bytes.

I believe adding a .RawDataSize member, would be valuable, for people who wish to migrate data out of IPFS.
It would allow them to consider the data segment's raw/target data size, and make decisions based around it, when dealing with foreign filesystems. For example, when dealing with file allocation sizes on an external drive of another format, prior to calling Cat().

My current workaround seems suboptimal: reference

Ping @magik6k, @schomatis

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementA net-new feature or improvement to an existing featuretopic/core-apiTopic core-api

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions