build/fuchsia/remote_cmd.py
def RunScp(self, sources, dest, direction, recursive=False):
    """Copies a file to or from a remote host using SCP and blocks until
    completion.

    sources: Paths of the files to be copied.
    dest: The path that |source| will be copied to.
    direction: Indicates whether the file should be copied to
               or from the remote side.
               Valid values are COPY_TO_TARGET or COPY_FROM_TARGET.
    recursive: If true, performs a recursive copy.

    Function will raise an assertion if a failure occurred."""

    scp_command = _SCP[:]
    if _SSH_LOGGER.getEffectiveLevel() == logging.DEBUG:
      scp_command.append('-v')
    if recursive:
      scp_command.append('-r')

    host = _EscapeIfIPv6Address(self._host)

    if direction == COPY_TO_TARGET:
      dest = "%s:%s" % (host, dest)
    else:
      sources = ["%s:%s" % (host, source) for source in sources]

    scp_command += ['-F', self._config_path]
    if self._port:
      scp_command += ['-P', str(self._port)]
    scp_command += sources
    scp_command += [dest]

    _SSH_LOGGER.debug(' '.join(scp_command))
    try:
      scp_output = subprocess.check_output(scp_command,
                                           stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as error:
      _SSH_LOGGER.info(error.output)
      raise
Copies a file to or from a remote host using SCP and blocks until
    completion.

    sources: Paths of the files to be copied.
    dest: The path that |source| will be copied to.
    direction: Indicates whether the file should be copied to
               or from the remote side.
               Valid values are COPY_TO_TARGET or COPY_FROM_TARGET.
    recursive: If true, performs a recursive copy.

    Function will raise an assertion if a failure occurred.
Copies a file to or from a remote host using SCP and blocks until
completion.

Paths of the files to be copied.
dest: The path that |source| will be copied to.
direction: Indicates whether the file should be copied to
or from the remote side.

Function will raise an assertion if a failure occurred.
Copies a file to or from a remote host using SCP and blocks until completion . Paths of the files to be copied . dest : The path that |source| will be copied to . direction : Indicates whether the file should be copied to or from the remote side . Function will raise an assertion if a failure occurred .
def RunScp(self, sources, dest, direction, recursive=False):
    scp_command = _SCP[:]
    if _SSH_LOGGER.getEffectiveLevel() == logging.DEBUG:
      scp_command.append('-v')
    if recursive:
      scp_command.append('-r')
    host = _EscapeIfIPv6Address(self._host)
    if direction == COPY_TO_TARGET:
      dest = "%s:%s" % (host, dest)
    else:
      sources = ["%s:%s" % (host, source) for source in sources]
    scp_command += ['-F', self._config_path]
    if self._port:
      scp_command += ['-P', str(self._port)]
    scp_command += sources
    scp_command += [dest]
    _SSH_LOGGER.debug(' '.join(scp_command))
    try:
      scp_output = subprocess.check_output(scp_command,
                                           stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as error:
      _SSH_LOGGER.info(error.output)
      raise
def RunScp ( self , sources , dest , direction , recursive = False ) : scp_command = _SCP [ : ] if _SSH_LOGGER . getEffectiveLevel ( ) == logging . DEBUG : scp_command . append ( '-v' ) if recursive : scp_command . append ( '-r' ) host = _EscapeIfIPv6Address ( self . _host ) if direction == COPY_TO_TARGET : dest = "%s:%s" % ( host , dest ) else : sources = [ "%s:%s" % ( host , source ) for source in sources ] scp_command += [ '-F' , self . _config_path ] if self . _port : scp_command += [ '-P' , str ( self . _port ) ] scp_command += sources scp_command += [ dest ] _SSH_LOGGER . debug ( ' ' . join ( scp_command ) ) try : scp_output = subprocess . check_output ( scp_command , stderr = subprocess . STDOUT ) except subprocess . CalledProcessError as error : _SSH_LOGGER . info ( error . output ) raise
Copies a file to or from a remote host using SCP and blocks until
completion.
Copies a file to or from a remote host using SCP and blocks until completion .
"""Copies a file to or from a remote host using SCP and blocks until
    completion.

    sources: Paths of the files to be copied.
    dest: The path that |source| will be copied to.
    direction: Indicates whether the file should be copied to
               or from the remote side.
               Valid values are COPY_TO_TARGET or COPY_FROM_TARGET.
    recursive: If true, performs a recursive copy.

    Function will raise an assertion if a failure occurred."""
self
sources
dest
direction
recursive