@cryptotaxi247 / kubo / commits / a94f9dab6

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 <richard.littauer@gmail.com>

Richard Littauer committed Mar 17, 2016 at 20:46 UTC a94f9dab6de76bac0a39db9b2033b6975f5ebb9e
1 file changed +20
core/commands/add.go
+20
@@ -35,6 +35,26 @@ var AddCmd = &cmds.Command{
35 Adds contents of <path> to ipfs. Use -r to add directories.
36 Note that directories are added recursively, to form the ipfs
37 MerkleDAG.
38 +`,
39 + LongDescription: `
40 +Adds contents of <path> to ipfs. Use -r to add directories.
41 +Note that directories are added recursively, to form the ipfs
42 +MerkleDAG.
43 +
44 +The wrap option, '-w', wraps the file (or files, if using the
45 +recursive option) in a directory. This directory contains only
46 +the files which have been added, and means that the file retains
47 +its filename. For example:
48 +
49 + > ipfs add example.jpg
50 + added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.jpg
51 + > ipfs add example.jpg -w
52 + added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.jpg
53 + added QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx
54 +
55 +You can now refer to the added file in a gateway, like so:
56 +
57 + /ipfs/QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx/example.jpg
58 `,
59 },
60