aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm/fs.go
diff options
context:
space:
mode:
authorElad <theman@elad.im>2018-10-12 20:51:38 +0800
committerAnton Evangelatov <anton.evangelatov@gmail.com>2018-10-12 20:51:38 +0800
commit4868964bb99facd8cc6149626023e64db14a6742 (patch)
tree858bfaddcb1f1381e3bb2e0dd4c72aed397e621d /cmd/swarm/fs.go
parent6f607de5d590ff2fbe8798b04e5924be3b7ca0b4 (diff)
downloadgo-tangerine-4868964bb99facd8cc6149626023e64db14a6742.tar
go-tangerine-4868964bb99facd8cc6149626023e64db14a6742.tar.gz
go-tangerine-4868964bb99facd8cc6149626023e64db14a6742.tar.bz2
go-tangerine-4868964bb99facd8cc6149626023e64db14a6742.tar.lz
go-tangerine-4868964bb99facd8cc6149626023e64db14a6742.tar.xz
go-tangerine-4868964bb99facd8cc6149626023e64db14a6742.tar.zst
go-tangerine-4868964bb99facd8cc6149626023e64db14a6742.zip
cmd/swarm: split flags and cli command declarations to the relevant files (#17896)
Diffstat (limited to 'cmd/swarm/fs.go')
-rw-r--r--cmd/swarm/fs.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/cmd/swarm/fs.go b/cmd/swarm/fs.go
index 3dc38ca4d..b970b2e8c 100644
--- a/cmd/swarm/fs.go
+++ b/cmd/swarm/fs.go
@@ -30,6 +30,43 @@ import (
"gopkg.in/urfave/cli.v1"
)
+var fsCommand = cli.Command{
+ Name: "fs",
+ CustomHelpTemplate: helpTemplate,
+ Usage: "perform FUSE operations",
+ ArgsUsage: "fs COMMAND",
+ Description: "Performs FUSE operations by mounting/unmounting/listing mount points. This assumes you already have a Swarm node running locally. For all operation you must reference the correct path to bzzd.ipc in order to communicate with the node",
+ Subcommands: []cli.Command{
+ {
+ Action: mount,
+ CustomHelpTemplate: helpTemplate,
+ Name: "mount",
+ Flags: []cli.Flag{utils.IPCPathFlag},
+ Usage: "mount a swarm hash to a mount point",
+ ArgsUsage: "swarm fs mount --ipcpath <path to bzzd.ipc> <manifest hash> <mount point>",
+ Description: "Mounts a Swarm manifest hash to a given mount point. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
+ },
+ {
+ Action: unmount,
+ CustomHelpTemplate: helpTemplate,
+ Name: "unmount",
+ Flags: []cli.Flag{utils.IPCPathFlag},
+ Usage: "unmount a swarmfs mount",
+ ArgsUsage: "swarm fs unmount --ipcpath <path to bzzd.ipc> <mount point>",
+ Description: "Unmounts a swarmfs mount residing at <mount point>. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
+ },
+ {
+ Action: listMounts,
+ CustomHelpTemplate: helpTemplate,
+ Name: "list",
+ Flags: []cli.Flag{utils.IPCPathFlag},
+ Usage: "list swarmfs mounts",
+ ArgsUsage: "swarm fs list --ipcpath <path to bzzd.ipc>",
+ Description: "Lists all mounted swarmfs volumes. This assumes you already have a Swarm node running locally. You must reference the correct path to your bzzd.ipc file",
+ },
+ },
+}
+
func mount(cliContext *cli.Context) {
args := cliContext.Args()
if len(args) < 2 {