1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00

ipfs files cp: improve docstring with better words.

And align capitalization.
This commit is contained in:
Hector Sanjuan
2020-04-02 20:46:31 +02:00
parent b5aaf75e25
commit 3b30e8e2b0

View File

@ -321,10 +321,10 @@ func walkBlock(ctx context.Context, dagserv ipld.DAGService, nd ipld.Node) (bool
var filesCpCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Copy any IPFS objects into mfs (or copy within MFS).",
Tagline: "Copy any IPFS files and directories 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
"ipfs files cp" can be used to copy any IPFS file or directory (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
@ -333,15 +333,15 @@ 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>
$ ipfs add --quieter --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."),
cmds.StringArg("dest", true, false, "Destination to copy object to."),
cmds.StringArg("source", true, false, "Source IPFS or MFS path to copy."),
cmds.StringArg("dest", true, false, "Destination within MFS."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)