1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00
Files
Łukasz Magiera 795d1ea540 coreapi unixfs: use fileAdder directly
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-10-03 14:08:15 +02:00

23 lines
611 B
Go

package iface
import (
"context"
"io"
options "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format"
)
// UnixfsAPI is the basic interface to immutable files in IPFS
type UnixfsAPI interface {
// Add imports the data from the reader into merkledag file
Add(context.Context, io.ReadCloser, ...options.UnixfsAddOption) (ResolvedPath, error)
// Cat returns a reader for the file
Cat(context.Context, Path) (Reader, error)
// Ls returns the list of links in a directory
Ls(context.Context, Path) ([]*ipld.Link, error)
}