2019-04-03 07:20:00 +00:00
|
|
|
package shell
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2019-06-05 08:30:24 +00:00
|
|
|
Commands = append(Commands, &commandFsPwd{})
|
2019-04-03 07:20:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type commandFsPwd struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *commandFsPwd) Name() string {
|
|
|
|
return "fs.pwd"
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *commandFsPwd) Help() string {
|
|
|
|
return `print out current directory`
|
|
|
|
}
|
|
|
|
|
2019-06-05 08:30:24 +00:00
|
|
|
func (c *commandFsPwd) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
2019-04-03 07:20:00 +00:00
|
|
|
|
|
|
|
fmt.Fprintf(writer, "http://%s:%d%s\n",
|
|
|
|
commandEnv.option.FilerHost,
|
|
|
|
commandEnv.option.FilerPort,
|
|
|
|
commandEnv.option.Directory,
|
|
|
|
)
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|