Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LargeBytesNode ¶ added in v1.3.0
type LargeBytesNode interface { adl.ADL AsLargeBytes() (io.ReadSeeker, error) }
A LargeBytesNode is an ipld.Node that can be streamed over. It is guaranteed to have a Bytes type.
func NewUnixFSFile ¶
func NewUnixFSFile(ctx context.Context, substrate ipld.Node, lsys *ipld.LinkSystem) (LargeBytesNode, error)
NewUnixFSFile attempts to construct an ipld node from the base protobuf node representing the root of a unixfs File. It provides a `bytes` view over the file, along with access to io.Reader streaming access to file data.
func NewUnixFSFileWithPreload ¶ added in v1.5.1
func NewUnixFSFileWithPreload(ctx context.Context, substrate ipld.Node, lsys *ipld.LinkSystem) (LargeBytesNode, error)
NewUnixFSFileWithPreload is the same as NewUnixFSFile but it performs a full load of constituent blocks where the file spans multiple blocks. This is useful where a system needs to watch the LinkSystem for block loads to determine which blocks make up this file. NewUnixFSFileWithPreload is used by the "unixfs-preload" reifier.