io

package
v0.4.5-pre2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

package unixfs/io implements convenience objects for working with the ipfs unixfs data format.

Index

Constants

This section is empty.

Variables

View Source
var ErrCantReadSymlinks = errors.New("cannot currently read symlinks")
View Source
var ErrIsDir = errors.New("this dag node is a directory")

Functions

func NewBufDagReader added in v0.4.5

func NewBufDagReader(b []byte) *bufDagReader

func NewDirectory

func NewDirectory(dserv mdag.DAGService) *directoryBuilder

NewDirectory returns a directoryBuilder. It needs a DAGService to add the Children

func NewEmptyDirectory added in v0.3.4

func NewEmptyDirectory() *mdag.ProtoNode

NewEmptyDirectory returns an empty merkledag Node with a folder Data chunk

func NewPBFileReader added in v0.4.5

func NewPBFileReader(ctx context.Context, n *mdag.ProtoNode, pb *ftpb.Data, serv mdag.DAGService) *pbDagReader

func ResolveUnixfsOnce added in v0.4.5

func ResolveUnixfsOnce(ctx context.Context, ds dag.DAGService, nd node.Node, name string) (*node.Link, error)

Types

type DagReader

type DagReader interface {
	ReadSeekCloser
	Size() uint64
	CtxReadFull(context.Context, []byte) (int, error)
	Offset() int64
}

func NewDagReader

func NewDagReader(ctx context.Context, n node.Node, serv mdag.DAGService) (DagReader, error)

NewDagReader creates a new reader object that reads the data represented by the given node, using the passed in DAGService for data retreival

type ReadSeekCloser

type ReadSeekCloser interface {
	io.Reader
	io.Seeker
	io.Closer
	io.WriterTo
}

Jump to

Keyboard shortcuts

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