Add REST command

This commit is contained in:
Arnaud Ysmal 2013-12-04 19:38:49 +01:00
parent 7c88c47f25
commit dc7badc748

7
ftp.go
View File

@ -385,6 +385,13 @@ func (c *ServerConn) CurrentDir() (string, error) {
return msg[start+1 : end], nil
}
// Rest issues a REST FTP command to specify the number of bytes to skip for
// the next transfer.
func (c *ServerConn) Rest(offset uint64) error {
_, _, err := c.cmd(StatusRequestFilePending, "REST %d", offset)
return err
}
// Retr issues a RETR FTP command to fetch the specified file from the remote
// FTP server.
//