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})