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.
2 parents c938d71 + a76ae5f commit 17e31bfCopy full SHA for 17e31bf
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 async fn restart_from(&mut self, offset: u64) -> Result<()> {
293
+ let rest_command = format!("REST {}\r\n", offset.to_string());
294
+ self.write_str(&rest_command).await?;
295
+ self.read_response(status::REQUEST_FILE_PENDING).await.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