You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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
The text was updated successfully, but these errors were encountered: