We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35b2006 commit 7f2e872Copy full SHA for 7f2e872
src/ftp.rs
@@ -435,6 +435,13 @@ impl FtpStream {
435
self.read_response(status::CLOSING).map(|_| ())
436
}
437
438
+ /// Sets the byte from which the transfer is to be restarted.
439
+ pub fn restart_from(&mut self, offset: u64) -> crate::Result<()> {
440
+ let rest_command = format!("REST {}\r\n", offset.to_string());
441
+ self.write_str(&rest_command)?;
442
+ self.read_response(status::COMMAND_OK).map(|_| ())
443
+ }
444
+
445
/// Retrieves the file name specified from the server.
446
/// This method is a more complicated way to retrieve a file.
447
/// The reader returned should be dropped.
0 commit comments