Documentation
¶
Overview ¶
package unixfs/io implements convenience objects for working with the ipfs unixfs data format.
Index ¶
- Variables
- func NewBufDagReader(b []byte) *bufDagReader
- func NewPBFileReader(ctx context.Context, n *mdag.ProtoNode, pb *ftpb.Data, serv mdag.DAGService) *pbDagReader
- func ResolveUnixfsOnce(ctx context.Context, ds dag.DAGService, nd node.Node, name string) (*node.Link, error)
- type DagReader
- type Directory
- func (d *Directory) AddChild(ctx context.Context, name string, nd node.Node) error
- func (d *Directory) Find(ctx context.Context, name string) (node.Node, error)
- func (d *Directory) ForEachLink(ctx context.Context, f func(*node.Link) error) error
- func (d *Directory) GetNode() (node.Node, error)
- func (d *Directory) Links(ctx context.Context) ([]*node.Link, error)
- func (d *Directory) RemoveChild(ctx context.Context, name string) error
- type ReadSeekCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultShardWidth = 256
DefaultShardWidth is the default value used for hamt sharding width.
View Source
var ShardSplitThreshold = 1000
ShardSplitThreshold specifies how large of an unsharded directory the Directory code will generate. Adding entries over this value will result in the node being restructured into a sharded object.
View Source
var UseHAMTSharding = false
UseHAMTSharding is a global flag that signifies whether or not to use the HAMT sharding scheme for directory creation
Functions ¶
func NewPBFileReader ¶ added in v0.4.5
Types ¶
type DagReader ¶
type Directory ¶ added in v0.4.8
type Directory struct {
// contains filtered or unexported fields
}
func NewDirectory ¶
func NewDirectory(dserv mdag.DAGService) *Directory
NewDirectory returns a Directory. It needs a DAGService to add the Children
func NewDirectoryFromNode ¶ added in v0.4.8
func (*Directory) AddChild ¶ added in v0.4.8
AddChild adds a (name, key)-pair to the root node.
func (*Directory) Find ¶ added in v0.4.8
func (*Directory) ForEachLink ¶ added in v0.4.8
func (*Directory) GetNode ¶ added in v0.4.8
GetNode returns the root of this Directory
func (*Directory) Links ¶ added in v0.4.8
Source Files
¶
- bufdagreader.go
- dagreader.go
- dirbuilder.go
- doc.go
- pbdagreader.go
- resolve.go
Click to show internal directories.
Click to hide internal directories.