coreapi unixfs: unixfs.Get
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@7b2fdc90ee0528d4c0a437d95b1cb0d10c3e8aa5 This commit was moved from ipfs/boxo@15a4331a185c812bab3e229758bcfc79d682ac5d
Łukasz Magiera committed
Oct 3, 2018 at 17:21 UTC
a7b89529611d0071f0be88d45c64aac557f95668
1 file changed
+8
core/coreiface/unixfs.go
+8
@@ -13,8 +13,16 @@ import (
13
// NOTE: This API is heavily WIP, things are guaranteed to break frequently
14
type UnixfsAPI interface {
15
// Add imports the data from the reader into merkledag file
16
+ //
17
+ // TODO: a long useful comment on how to use this for many different scenarios
18
Add(context.Context, files.File, ...options.UnixfsAddOption) (ResolvedPath, error)
19
20
+ // Get returns a read-only handle to a file tree referenced by a path
21
+ //
22
+ // Note that some implementations of this API may apply the specified context
23
+ // to operations performed on the returned file
24
+ Get(context.Context, Path) (files.File, error)
25
+
26
// Cat returns a reader for the file
27
Cat(context.Context, Path) (Reader, error)
28