Skip to content

Commit

Permalink
Fix ipfs#4996: Improve help text for "ipfs files cp"
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanjuan authored and Walter Beegle committed Jun 8, 2020
1 parent 0b46319 commit 81ef156
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion core/commands/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,23 @@ func walkBlock(ctx context.Context, dagserv ipld.DAGService, nd ipld.Node) (bool

var filesCpCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Copy files into mfs.",
Tagline: "Copy any IPFS objects into mfs (or copy within MFS).",
ShortDescription: `
"ipfs files cp" can be used to copy any IPFS object (usually in the form
/ipfs/<CID>, but also any resolvable path), into the Mutable File System
(MFS).
It can also be used to copy files within MFS, but in the case when an
IPFS-path matches an existing MFS path, the IPFS path wins.
In order to add content to MFS from disk, you can use "ipfs add" to obtain the
IPFS Content Identifier and then "ipfs files cp" to copy it into MFS:
$ ipfs add --pin=false <your file>
# ...
# ... outputs the root CID at the end
$ ipfs cp /ipfs/<CID> /your/desired/mfs/path
`,
},
Arguments: []cmds.Argument{
cmds.StringArg("source", true, false, "Source object to copy."),
Expand Down

0 comments on commit 81ef156

Please sign in to comment.