aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_pwd.go
blob: d7d9819c8c6baa7222aec669be2a399fb85df3c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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`
}

func (c *commandFsPwd) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {

	fmt.Fprintf(writer, "%s\n", commandEnv.option.Directory)

	return nil
}