1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00
Files
Łukasz Magiera f218b69e47 coreapi: split the interface into multiple files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-03-10 18:46:45 +01:00

21 lines
504 B
Go

package iface
import (
"context"
"io"
ipld "gx/ipfs/Qme5bWv7wtjUNGsK2BNGVUFPKiuxWrsqrtvYwCLRw8YFES/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.Reader) (Path, 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)
}