Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoreAPI: UnixFS, discerning directories from non-directories. #5326

Closed
djdv opened this issue Aug 1, 2018 · 1 comment
Closed

CoreAPI: UnixFS, discerning directories from non-directories. #5326

djdv opened this issue Aug 1, 2018 · 1 comment
Labels
topic/core-api Topic core-api

Comments

@djdv
Copy link
Contributor

djdv commented Aug 1, 2018

At the moment, I am relying on an error returned from Cat() to determine the type of object I'm dealing with.
(reference)
I think something like .IsDir() on the UnixFS interface, or something more generic, like .Type on the ObjectStat, containing some value like: Unknown, UnixFsDir, RawData, etc., would be a better alternative than relying on Cat()'s error, if you're trying to use the CoreAPI alone (without dropping into relevant pkg for each node format you wish to handle).

Relevant:
ipfs/go-unixfs#3
#3430

Ping @schomatis, @magik6k

@djdv djdv added the topic/core-api Topic core-api label Aug 1, 2018
@magik6k
Copy link
Member

magik6k commented Aug 1, 2018

Unixfs coreapi will get a major refactor, I'll take that into account

@momack2 momack2 added this to Inbox in ipfs/go-ipfs May 9, 2019
@magik6k magik6k closed this as completed May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/core-api Topic core-api
Projects
No open projects
Development

No branches or pull requests

2 participants