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 c938d71 commit 2808855Copy full SHA for 2808855
src/ftp.rs
@@ -288,6 +288,12 @@ impl FtpStream {
288
self.read_response(status::CLOSING).await?;
289
Ok(())
290
}
291
+ /// Sets the byte from which the transfer is to be restarted.
292
+ pub fn restart_from(&mut self, offset: u64) -> crate::Result<()> {
293
+ let rest_command = format!("REST {}\r\n", offset.to_string());
294
+ self.write_str(&rest_command)?;
295
+ self.read_response(status::REQUEST_FILE_PENDING).map(|_| ())
296
+ }
297
298
/// Retrieves the file name specified from the server.
299
/// This method is a more complicated way to retrieve a file.
0 commit comments