From dc7badc74843a00d135951d9e9f35a98b71e2114 Mon Sep 17 00:00:00 2001 From: Arnaud Ysmal Date: Wed, 4 Dec 2013 19:38:49 +0100 Subject: [PATCH] Add REST command --- ftp.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ftp.go b/ftp.go index 542565a..94df1f2 100644 --- a/ftp.go +++ b/ftp.go @@ -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. //