mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-07 09:17:49 +08:00
core/coreunix: Documented return values
This commit is contained in:
parent
54fef5ea96
commit
e5f3ac99c3
@ -67,6 +67,8 @@ func AddR(n *core.IpfsNode, root string) (key string, err error) {
|
||||
|
||||
// AddWrapped adds data from a reader, and wraps it with a directory object
|
||||
// to preserve the filename.
|
||||
// Returns the path of the added file ("<dir hash>/filename"), the DAG node of
|
||||
// the directory, and and error if any.
|
||||
func AddWrapped(n *core.IpfsNode, r io.Reader, filename string) (string, *merkledag.Node, error) {
|
||||
file := files.NewReaderFile(filename, ioutil.NopCloser(r), nil)
|
||||
dir := files.NewSliceFile("", []files.File{file})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user