Documentation ¶
Overview ¶
package path implements utilities for resolving paths within ipfs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
DAG merkledag.DAGService
}
Resolver provides path resolution to IPFS It has a pointer to a DAGService, which is uses to resolve nodes.
func (*Resolver) ResolveLinks ¶
func (s *Resolver) ResolveLinks(ndd *merkledag.Node, names []string) ( nd *merkledag.Node, err error)
ResolveLinks iteratively resolves names by walking the link hierarchy. Every node is fetched from the DAGService, resolving the next name. Returns the last node found.
ResolveLinks(nd, []string{"foo", "bar", "baz"}) would retrieve "baz" in ("bar" in ("foo" in nd.Links).Links).Links
Click to show internal directories.
Click to hide internal directories.