unixfile

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndSplitMetadata added in v0.4.9

func CheckAndSplitMetadata(ctx context.Context, nd ipld.Node, ds ipld.DAGService, meta bool) (ipld.Node, ipld.Node, error)

checkAndSplitMetadata returns both data root node and metadata root node if exists from the DAG topped by the given 'nd'. Case #1: if 'nd' is dummy root with metadata root node and user data root node being children,

return [the second data root child node, the first metadata root child node, nil].

Case #2: if 'nd' is metadata and the given `meta` is true, return [nil, nd, nil]. Otherwise return error. Case #3: if 'nd' is user data, return ['nd', nil, nil].

func NewUnixfsFile

func NewUnixfsFile(ctx context.Context, dserv ipld.DAGService, nd ipld.Node, meta bool) (files.Node, error)

NewUnixFsFile returns a DagReader for the 'nd' root node. If meta = true, only return a valid metadata node if it exists. If not, return error. If meta = false, return only the data contents.

Types

This section is empty.

Jump to

Keyboard shortcuts

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