add new command
closes #6 Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
parent
d8b8730f40
commit
066a8d5b6c
7
main.go
7
main.go
@ -55,6 +55,8 @@ func handle(c net.Conn) {
|
||||
cmd := parts[0]
|
||||
params := strings.Join(parts[1:], "")
|
||||
switch cmd {
|
||||
case "CDUP":
|
||||
s.cmdServerCdup(params)
|
||||
case "RNFR":
|
||||
s.cmdServerRnfr(params)
|
||||
case "OPTS":
|
||||
@ -417,7 +419,12 @@ func (s *Conn) cmdServerCwd(args string) {
|
||||
s.path = filepath.Clean(args)
|
||||
}
|
||||
s.ctrl.PrintfLine(`250 "%s" is current directory.`, s.path)
|
||||
}
|
||||
|
||||
func (s *Conn) cmdServerCdup(args string) {
|
||||
fmt.Printf("cmdServerCdup: %s\n", args)
|
||||
s.path = filepath.Dir(s.path)
|
||||
s.ctrl.PrintfLine(`250 "%s" is current directory.`, s.path)
|
||||
}
|
||||
|
||||
func (s *Conn) cmdServerPort(args string) {
|
||||
|
Loading…
Reference in New Issue
Block a user