List files in the project on computes
175431
def list_files(self, project):
        
        path = "/projects/{}/files".format(project.id)
        res = yield from self.http_query("GET", path, timeout=120)
        return res.json
1280924
def list_files(path, extension=".cpp", exclude="S.cpp"):
    """"""
    return ["%s/%s" % (path, f) for f in listdir(path) if f.endswith(extension) and (not f.endswith(exclude))]
1269622
def file_list( files )
    case files
    when String
      [files]
    when Array
      files
    when Proc
      files.call # result should respond to #each
    else
      []
    end
  end
940699
def _upload_file(compute, project_id, file_path, path):
    
    path = "/projects/{}/files/{}".format(project_id, path.replace("\\", "/"))
    with open(file_path, "rb") as f:
        yield from compute.http_query("POST", path, f, timeout=None)
755236
def file_list(self, load):
        '''
        
        '''
        if 'env' in load:
            # "env" is not supported; Use "saltenv".
            load.pop('env')

        ret = set()
        if 'saltenv' not in load:
            return []
        if not isinstance(load['saltenv'], six.string_types):
            load['saltenv'] = six.text_type(load['saltenv'])

        for fsb in self.backends(load.pop('fsbackend', None)):
            fstr = '{0}.file_list'.format(fsb)
            if fstr in self.servers:
                ret.update(self.servers[fstr](load))
        # some *fs do not handle prefix. Ensure it is filtered
        prefix = load.get('prefix', '').strip('/')
        if prefix != '':
            ret = [f for f in ret if f.startswith(prefix)]
        return sorted(ret)
1057754
def file_list( blockchain_id, config_path=CONFIG_PATH, wallet_keys=None ):
    

    config_dir = os.path.dirname(config_path)
    client_config_path = os.path.join(config_dir, blockstack_client.CONFIG_FILENAME )
    proxy = blockstack_client.get_default_proxy( config_path=client_config_path )

    res = blockstack_client.data_list( blockchain_id, wallet_keys=wallet_keys, proxy=proxy )
    if 'error' in res:
        log.error("Failed to list data: %s" % res['error'])
        return {'error': 'Failed to list data'}

    listing = []

    # find the ones that this app put there 
    for rec in res['listing']:
        if not file_is_fq_data_name( rec['data_id'] ):
            continue
        
        listing.append( rec )

    return {'status': True, 'listing': listing}
221197
def list_experiments(project_path, sort, output, filter_op, columns):
    """"""
    if columns:
        columns = columns.split(",")
    commands.list_experiments(project_path, sort, output, filter_op, columns)
382722
def get_task_runs(self, json_file=None):
        """"""
        if self.project is None:
            raise ProjectError
        loader = create_task_runs_loader(self.project.id, self.tasks,
                                         json_file, self.all)
        self.task_runs, self.task_runs_file = loader.load()

        self._check_project_has_taskruns()
        self.task_runs_df = dataframer.create_task_run_data_frames(self.tasks, self.task_runs)
181991
def list(self, request):
        
        pipeline = [{'$match': request.args.pop('match', {})}]

        sort = request.args.pop('sort', {})
        if sort:
            pipeline.append({'$sort': sort})

        project = request.args.pop('project', {})
        if project:
            pipeline.append({'$project': project})

        return Response(serialize(self.collection.aggregate(pipeline)))
636535
def _get_files(self):
        
        excludes = [
            '.git',
            '.tox',
            '.vagrant',
            '.venv',
            os.path.basename(self._config.verifier.directory),
        ]
        generators = [
            util.os_walk(self._config.project_directory, '*.yml', excludes),
            util.os_walk(self._config.project_directory, '*.yaml', excludes),
        ]

        return [f for g in generators for f in g]
118885
def listing(self):
        ""
        return ['.'.join([f,ext]) if ext else f for (f,ext) in self._files.keys()]
1022257
def list_projects(root, backend=os.listdir):
    
    projects = list()
    for project in sorted(backend(root)):
        abspath = os.path.join(root, project)
        if not isproject(abspath):
            continue
        projects.append(project)
    return projects
684075
def list
      files = Dir.glob("#{coverage_dir}/*.html")
      files.map { |file| File.basename(file) }
    end
777443
def _storage_list_buckets(project, pattern):
  
  data = [{'Bucket': 'gs://' + bucket.name, 'Created': bucket.metadata.created_on}
          for bucket in datalab.storage.Buckets(project_id=project)
          if fnmatch.fnmatch(bucket.name, pattern)]
  return datalab.utils.commands.render_dictionary(data, ['Bucket', 'Created'])
907513
def list_files(self, prefix, flat=False):
    
    layer_path = self.get_path_to_file("")        
    path = os.path.join(layer_path, prefix)
    for blob in self._bucket.list_blobs(prefix=path):
      filename = blob.name.replace(layer_path, '')
      if not flat and filename[-1] != '/':
        yield filename
      elif flat and '/' not in blob.name.replace(path, ''):
        yield filename
149568
def _compute_all_files(self):
        """"""
        self._all_files = any(pat.all_files() for pat in self.patterns)
342686
def matchingfiles(self, projectpath):
        """"""
        results = []

        if projectpath[-1] == '/':
            inputpath = projectpath + 'input/'
        else:
            inputpath = projectpath + '/input/'

        for linkf,realf in clam.common.util.globsymlinks(inputpath + '/.*.INPUTTEMPLATE.' + self.id + '.*'):
            seqnr = int(linkf.split('.')[-1])
            results.append( (seqnr, realf[len(inputpath):], self) )
        results = sorted(results)
        if self.unique and len(results) != 1:
            return []
        else:
            return results