List objects specified by path.

        Returns sorted list of 'gs://' or 's3n://' URIs.
16783
def list(self, path, filename=None, start=None, stop=None, recursive=False, directories=False):
        
        storageScheme, keys = self.getkeys(
            path, filename=filename, directories=directories, recursive=recursive)
        keys = [storageScheme + ":///" + key.bucket.name + "/" + key.name for key in keys]
        keys.sort()
        keys = select(keys, start, stop)
        return keys
839446
def list(self, path=None, with_metadata=False):
        ''''''

        path = path.strip('/') if path else ''

        if self.upstream:
            return self.upstream.list(path, with_metadata=with_metadata)
        else:
            raise NotImplementedError()
391215
def list(self, path):
        
        try:
            payload = {
                'list': True
            }
            return self._adapter.get('/v1/{0}'.format(path), params=payload).json()
        except exceptions.InvalidPath:
            return None
282771
def list_files(self, prefix, flat=False):
    

    layer_path = self.get_path_to_file("")        
    path = os.path.join(layer_path, prefix)

    @retry
    def s3lst(continuation_token=None):
      kwargs = {
        'Bucket': self._path.bucket,
        'Prefix': path,
      }

      if continuation_token:
        kwargs['ContinuationToken'] = continuation_token

      return self._conn.list_objects_v2(**kwargs)

    resp = s3lst()

    def iterate(resp):
      if 'Contents' not in resp.keys():
        resp['Contents'] = []

      for item in resp['Contents']:
        key = item['Key']
        filename = key.replace(layer_path, '')
        if not flat and filename[-1] != '/':
          yield filename
        elif flat and '/' not in key.replace(path, ''):
          yield filename


    for filename in iterate(resp):
      yield filename

    while resp['IsTruncated'] and resp['NextContinuationToken']:
      resp = s3lst(resp['NextContinuationToken'])

      for filename in iterate(resp):
        yield filename
733165
def list(path='.'):
    """"""
    import os
    for f in os.listdir(path):
        if isfile(join(path, f)):
            yield join(path, f) if path != '.' else f
114083
def list_filepathes_with_predicate(path_dir, predicate):
    '''
    '''
    if not os.path.isdir(path_dir):
        raise ValueError("{} is not a directory".format(path_dir))
    contents = (os.path.join(path_dir, a) for a in os.listdir(path_dir))
    files = (c for c in contents if os.path.isfile(c))
    return [f for f in files if f.startswith(predicate)]
1056517
def listdir(*paths, glob=None):
    '''
    
    '''
    path = genpath(*paths)

    names = os.listdir(path)
    if glob is not None:
        names = fnmatch.filter(names, glob)

    retn = [os.path.join(path, name) for name in names]
    return retn
946394
def get_folders(path):
        
        folder_paths = []

        for item in os.listdir(path):
            folder_path = os.path.join(path, item)

            if os.path.isdir(folder_path):
                folder_paths.append(folder_path)

        return folder_paths
812378
def get_paths_goobjs(go_objs, go_top=None, go2obj=None):
    """"""
    go_paths = []  # Collect all paths for go_objs
    go_all = set() # Collect all GO terms in all paths
    pathobj = GoPaths()
    for go_obj in go_objs:
        #print "?FIND PATHS FOR {}?".format(go_obj.id)
        if go_obj.id not in go_all: # GO not yet seen in paths already found
            #print "!FIND PATHS FOR {}!".format(go_obj.id)
            paths_curr = pathobj.get_paths_from_to(go_obj, go_top, True)
            if paths_curr:
                for path_goobjs in paths_curr:
                    for path_goobj in path_goobjs:
                        goid = path_goobj.id
                        if goid not in go_all:
                            go_all.add(goid)
                            go2obj[goid] = path_goobj
                # go_all.update(GO.id for path in paths_curr for GO in path)
                go_paths.extend(path for path in paths_curr)
    return go_paths, go_all
267610
def getfiles(self, path, ext=None, start=None, stop=None, recursive=False):
        
        from .utils import connection_with_anon, connection_with_gs

        parse = BotoClient.parse_query(path)

        scheme = parse[0]
        bucket_name = parse[1]

        if scheme == 's3' or scheme == 's3n':
            conn = connection_with_anon(self.credentials)
            bucket = conn.get_bucket(parse[1])
        elif scheme == 'gs':
            conn = connection_with_gs(bucket_name)
            bucket = conn.get_bucket()
        else:
            raise NotImplementedError("No file reader implementation for URL scheme " + scheme)

        keys = BotoClient.retrieve_keys(
            bucket, parse[2], prefix=parse[3], postfix=parse[4], recursive=recursive)
        keylist = [key.name for key in keys]
        if ext:
            if ext == 'tif' or ext == 'tiff':
                keylist = [keyname for keyname in keylist if keyname.endswith('tif')]
                keylist.append([keyname for keyname in keylist if keyname.endswith('tiff')])
            else:
                keylist = [keyname for keyname in keylist if keyname.endswith(ext)]

        keylist.sort()
        keylist = select(keylist, start, stop)

        return scheme, bucket.name, keylist
546264
function(path) {
            var parts = [];
            qq.each(path.split("/"), function(idx, item) {
                parts.push(qq.s3.util.uriEscape(item));
            });
            return parts.join("/");
        }
1270004
def listdir(path='.'):
    
    return [name.rstrip('/') for name, _ in
            get_instance(path).list_objects(path, first_level=True)]
16371
def get_path_list(opts):
    
    paths = []
    for opt, arg in list(opts.items()):
        if opt in ('-p', '--jspath'):
            paths.append(arg)
    return paths or [os.getcwd()]
1239233
def get_repository_names(path):
    
    return [subdir
            for subdir in os.listdir(path)
            if os.path.isdir(os.path.join(path, subdir, '.git'))]
1114106
def list_dir_abspath(path):
    
    return map(lambda f: os.path.join(path, f), os.listdir(path))
656202
def list_directory(self, *args, **kwargs):
		
		return tuple(self.dav_client().list(self.session_path()))
556495
def print_paths(self):
        '''
        
        '''
        for path_key, path_value in self.paths.items():
            # Handler for request in path
            self.current_path = path_key
            for request_key, request_value in path_value.items():
                if request_key == 'parameters':
                    continue
                self.get_main_title(path_key, request_key)
                self.get_description(request_value)
                self.get_status_code_and_schema_rst(request_value['responses'])
                self.get_params(path_value['parameters'], 'param')
                self.get_params(request_value['parameters'], 'query')