Commit 7fad9653 authored by Łukasz Magiera's avatar Łukasz Magiera

coreapi unixfs: Return seeker from get

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent 26985dbe
...@@ -2,6 +2,7 @@ package iface ...@@ -2,6 +2,7 @@ package iface
import ( import (
"context" "context"
"io"
options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" options "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
...@@ -17,6 +18,11 @@ type AddEvent struct { ...@@ -17,6 +18,11 @@ type AddEvent struct {
Size string `json:",omitempty"` Size string `json:",omitempty"`
} }
type UnixfsFile interface {
files.SizeFile
io.Seeker
}
// UnixfsAPI is the basic interface to immutable files in IPFS // UnixfsAPI is the basic interface to immutable files in IPFS
// NOTE: This API is heavily WIP, things are guaranteed to break frequently // NOTE: This API is heavily WIP, things are guaranteed to break frequently
type UnixfsAPI interface { type UnixfsAPI interface {
...@@ -29,7 +35,7 @@ type UnixfsAPI interface { ...@@ -29,7 +35,7 @@ type UnixfsAPI interface {
// //
// Note that some implementations of this API may apply the specified context // Note that some implementations of this API may apply the specified context
// to operations performed on the returned file // to operations performed on the returned file
Get(context.Context, Path) (files.File, error) Get(context.Context, Path) (UnixfsFile, error)
// Ls returns the list of links in a directory // Ls returns the list of links in a directory
Ls(context.Context, Path) ([]*ipld.Link, error) Ls(context.Context, Path) ([]*ipld.Link, error)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment