file

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2022 License: Apache-2.0, MIT Imports: 8 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamableByteNode

type StreamableByteNode interface {
	ipld.Node
	io.Reader
}

A StreamableByteNode 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) (StreamableByteNode, 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL