From e5f3ac99c31121a88bc08c9784b5e950b7fcb333 Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Mon, 2 Feb 2015 10:13:33 -0800 Subject: [PATCH] core/coreunix: Documented return values --- core/coreunix/add.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/coreunix/add.go b/core/coreunix/add.go index df591574d..32aaca4ac 100644 --- a/core/coreunix/add.go +++ b/core/coreunix/add.go @@ -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 ("/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})