Resume file download/upload?

I managed to make some progress on my task, implementing a sftp client/server and also a basic node client/server which can exchange files.
Now a new specification has been added to my bench/project:
Resume file upload/download.
I didn’t see that the “reget” command (which is the sftp command to resume transfers) mentionned in the Erlang ssh_sftp library
Do you have some ideas to achieve that (node to node or sftp genserver to sftp genserver) ?
TIA.

reget is not a traditional sftp command, it was added to openssh’s version of sftp a bit ago, but different sftp implementations are different. Technically the correct way to resume a file in the sftp protocol is to seek to position of the file and then read the file. As I recall the spec mandates that at least one forward file seek must be allowed before reading the file, and it is for that purpose. In the erlang ssh_sftp client I’m pretty sure that was set via the position call or something like that (or pread to both set a start position and read from that point on).

1 Like