rust-ftp
rust-ftp copied to clipboard
[feature]: support byte offset when retrieving a file
It would nice to be able to resume partial downloads by specifying the bytes offset from which to read from.
Python's ftplib supports this and can be a good reference source:
FTP.retrbinary(cmd, callback, blocksize=8192, rest=None)
Retrieve a file in binary transfer mode. [...] rest means the same thing as in the
transfercmd()
method.
FTP.transfercmd(cmd, rest=None) [...] If optional rest is given, a REST command is sent to the server, passing rest as an argument. rest is usually a byte offset into the requested file, telling the server to restart sending the file’s bytes at the requested offset, skipping over the initial bytes. .....