@log_calls
  def copy(self, scope, path, srev, local_path, clobber=False, recursive=False, backup_suffix=None):
    '''
    Download files from the repository directly.
    '''
    mf = self.get_manifest(scope, srev)
    if recursive:
      items = mf.get_listing(path, recursive=True)
      if not items:
        raise Failure("no items in path '%s' for revision '%s' of scope '%s' (try 'copy -a' instead?)" % (path, mf.rev, scope), suppressable=True)
      self.fetch_items(scope, items, local_path, clobber=clobber)
    else:
      if os.path.isdir(local_path):
        local_path = join_path(local_path, os.path.basename(path))
      item = mf.get_item(path)
      if not item:
        raise InvalidOperation("item '%s' not found in revision '%s' of scope '%s'" % (path, mf.rev, scope))
      self.fetcher.fetch_item(scope, item, local_path, target_is_dir=False, clobber=clobber, backup_suffix=backup_suffix, show_info=True)
    return mf.rev
dataset/ETHPy150Open bloomreach/zinc/zinc.py/Repo.copy/original