You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SCP in source mode has a special flag called "r" that will send the contents of the directory (recursively) to the target (us in the case we are downloading).
The following will need to be implemented (at least):
An additional parameter needs to be added to the CopyFromRemotePassThru method (and variants), so that it can be specified that an entire directory needs to be copied
A way to specify using a parameter what to do with each individual file from that directory.
The "-r" option needs to be passed to the remote scp command
We need to support the D control message that specifies that a list of files for a directory is about to be sent.
The text was updated successfully, but these errors were encountered:
This is something I would be interested in having working for a project I am working on. Are there any specific challenges in implementing this? Does SCP have a special way of doing this? @bramvdbogaerde
It probably is not particularly difficult to implement. Looking at the specification [1], we would need to support D and E messages which control the start and end of a directory respectively. This feature would probably also entail a change in the public API of this library. This is because of the fact that not all Copy functions accept a filepath as an argument. Instead, they accept an io.Writer which is not aware of file locations, directories, ... So I propose to discuss the API design here first before making any changes.
I welcome any contributions, be it to this discussion, or in the form of a PR.
SCP in source mode has a special flag called "r" that will send the contents of the directory (recursively) to the target (us in the case we are downloading).
The following will need to be implemented (at least):
CopyFromRemotePassThru
method (and variants), so that it can be specified that an entire directory needs to be copiedscp
commandD
control message that specifies that a list of files for a directory is about to be sent.The text was updated successfully, but these errors were encountered: