core/commands: Made 'add' use OptionRecursivePath
Matt Bell committed
Nov 19, 2014 at 00:36 UTC
87853f2bded33ca10f80d86b9a710a9f00808c2a
1 file changed
+3
core/commands/add.go
+3
@@ -39,6 +39,9 @@ remains to be implemented.
39
Arguments: []cmds.Argument{
40
cmds.FileArg("path", true, true, "The path to a file to be added to IPFS").EnableRecursive(),
41
},
42
+ Options: []cmds.Option{
43
+ cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive)
44
+ },
45
Run: func(req cmds.Request) (interface{}, error) {
46
added := &AddOutput{}
47
n, err := req.Context().GetNode()