datalad_next.shell.DownloadResponseGeneratorPosix

class datalad_next.shell.DownloadResponseGeneratorPosix(stdout: OutputFrom)[source]

Bases: DownloadResponseGenerator

A response generator for efficient download commands from Linux systems

get_final_command(remote_file_name: bytes) bytes[source]

Return a final command list for the download of remote_file_name

The POSIX version for download response generators.

This method is usually only called by ShellCommandExecutor.__call__().

Parameters:

remote_file_name (bytes) -- The name of the file that should be downloaded. If the file name contains special character, e.g. space or $, it must be quoted for a POSIX shell, for example with shlex.quote.

Returns:

The final command that will be executed in the persistent shell in order to start the download in the connected shell.

Return type:

bytes