chrome/test/data/android/upload_download_utils.py
def download(directory, filter, scenario, gcs_bucket):
  """Downloads the files from cloud as according to the given directory.

  Args:
    directory: A local disk directory.
    filter: A method to filter target files inside this directory.
    scenario: A scenario names that utilize this download method.
    gcs_bucket: A GCS bucket name to be used in the download.
  """
  # If someone removes a SHA1 file, we want to remove the associated cloud file
  # the next time file are updated.
  files_to_delete = _get_files_to_delete(directory, filter)
  for file_path in files_to_delete:
    os.remove(file_path)

  # Downloading the files can be very spammy, so only show the output if
  # something actually goes wrong.
  try:
    subprocess.check_output([
        'download_from_google_storage',
        '--bucket', gcs_bucket,
        '-d', directory,
        '-t', str(_get_thread_count()),
    ], stderr=subprocess.STDOUT)
  except subprocess.CalledProcessError as e:
    logging.error('Downloading %s in directory %s failed with error '
                  '%d: %s', scenario, directory, e.returncode, e.output)
Downloads the files from cloud as according to the given directory.

  Args:
    directory: A local disk directory.
    filter: A method to filter target files inside this directory.
    scenario: A scenario names that utilize this download method.
    gcs_bucket: A GCS bucket name to be used in the download.
  
Downloads the files from cloud as according to the given directory.
Downloads the files from cloud as according to the given directory .
def download(directory, filter, scenario, gcs_bucket):
  files_to_delete = _get_files_to_delete(directory, filter)
  for file_path in files_to_delete:
    os.remove(file_path)
  try:
    subprocess.check_output([
        'download_from_google_storage',
        '--bucket', gcs_bucket,
        '-d', directory,
        '-t', str(_get_thread_count()),
    ], stderr=subprocess.STDOUT)
  except subprocess.CalledProcessError as e:
    logging.error('Downloading %s in directory %s failed with error '
                  '%d: %s', scenario, directory, e.returncode, e.output)
def download ( directory , filter , scenario , gcs_bucket ) : files_to_delete = _get_files_to_delete ( directory , filter ) for file_path in files_to_delete : os . remove ( file_path ) try : subprocess . check_output ( [ 'download_from_google_storage' , '--bucket' , gcs_bucket , '-d' , directory , '-t' , str ( _get_thread_count ( ) ) , ] , stderr = subprocess . STDOUT ) except subprocess . CalledProcessError as e : logging . error ( 'Downloading %s in directory %s failed with error ' '%d: %s' , scenario , directory , e . returncode , e . output )
Downloads the files from cloud as according to the given directory.
Downloads the files from cloud as according to the given directory .
"""Downloads the files from cloud as according to the given directory.

  Args:
    directory: A local disk directory.
    filter: A method to filter target files inside this directory.
    scenario: A scenario names that utilize this download method.
    gcs_bucket: A GCS bucket name to be used in the download.
  """ # If someone removes a SHA1 file, we want to remove the associated cloud file # the next time file are updated. # Downloading the files can be very spammy, so only show the output if # something actually goes wrong.
directory
A local disk directory.
A local disk directory .
filter
A method to filter target files inside this directory.
A method to filter target files inside this directory .
scenario
A scenario names that utilize this download method.
A scenario names that utilize this download method .
gcs_bucket
A GCS bucket name to be used in the download.
A GCS bucket name to be used in the download .