From a94f9dab6de76bac0a39db9b2033b6975f5ebb9e Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Thu, 17 Mar 2016 20:46:00 -0400 Subject: [PATCH] Added a long description to add This explains mostly what the wrap option does, because it was not entirely clear License: MIT Signed-off-by: Richard Littauer --- core/commands/add.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/core/commands/add.go b/core/commands/add.go index 814afc9df..21978af1b 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -35,6 +35,26 @@ var AddCmd = &cmds.Command{ Adds contents of to ipfs. Use -r to add directories. Note that directories are added recursively, to form the ipfs MerkleDAG. +`, + LongDescription: ` +Adds contents of to ipfs. Use -r to add directories. +Note that directories are added recursively, to form the ipfs +MerkleDAG. + +The wrap option, '-w', wraps the file (or files, if using the +recursive option) in a directory. This directory contains only +the files which have been added, and means that the file retains +its filename. For example: + + > ipfs add example.jpg + added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.jpg + > ipfs add example.jpg -w + added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.jpg + added QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx + +You can now refer to the added file in a gateway, like so: + + /ipfs/QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx/example.jpg `, },