Exemple #1
0
func get(ctx context.Context, node *core.IpfsNode, p path.Path, compression int) (io.Reader, error) {
	dagnode, err := core.Resolve(ctx, node, p)
	if err != nil {
		return nil, err
	}

	return utar.NewReader(ctx, p, node.DAG, dagnode, compression)
}
Exemple #2
0
func get(ctx context.Context, node *core.IpfsNode, p string, compression int) (io.Reader, error) {
	pathToResolve := path.Path(p)
	dagnode, err := core.Resolve(ctx, node, pathToResolve)
	if err != nil {
		return nil, err
	}

	return utar.NewReader(pathToResolve, node.DAG, dagnode, compression)
}