Added Logout() method.

This commit is contained in:
Julien Laffaye
2013-05-19 21:15:23 +02:00
parent e00e1f11a0
commit 91fc6ada34
2 changed files with 11 additions and 0 deletions

6
ftp.go
View File

@@ -327,6 +327,12 @@ func (c *ServerConn) NoOp() error {
return err
}
// Logout issues a REIN FTP command to logout the current user.
func (c *ServerConn) Logout() error {
_, _, err := c.cmd(StatusLoggedIn, "REIN")
return err
}
// Quit issues a QUIT FTP command to properly close the connection from the
// remote FTP server.
func (c *ServerConn) Quit() error {