seaweedfs/weed/shell/command_fs_pwd.go

33 lines
509 B
Go
Raw Normal View History

package shell
import (
"fmt"
"io"
)
func init() {
Commands = append(Commands, &commandFsPwd{})
}
type commandFsPwd struct {
}
func (c *commandFsPwd) Name() string {
return "fs.pwd"
}
func (c *commandFsPwd) Help() string {
return `print out current directory`
}
2024-09-30 01:38:22 +08:00
func (c *commandFsPwd) HasTag(CommandTag) bool {
return false
}
func (c *commandFsPwd) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
2020-03-24 17:40:29 +08:00
fmt.Fprintf(writer, "%s\n", commandEnv.option.Directory)
return nil
}