List bitstreams of an object::

    usage: cdstar ls [options] <URL>

    options:
        -t  sort by modification time, newest first
        -s  sort by filesize, biggest first
        -r  reverse order while sorting
328587
def c_ls(api, args, verbose=False):
    
    obj = api.get_object(args['<URL>'].split('/')[-1])
    res = []
    for bitstream in obj.bitstreams:
        res.append((
            api.url(bitstream),
            bitstream._properties['content-type'],
            bitstream._properties['filesize'],
            datetime.fromtimestamp(bitstream._properties['last-modified'] / 1000.0)
        ))
    if args['-t']:
        res = sorted(res, key=lambda t: t[3], reverse=True)
    elif args['-s']:
        res = sorted(res, key=lambda t: t[2], reverse=True)
    if args['-r']:
        res = reversed(res)

    for r in res:
        yield '{0}\t{1}\t{2:>8}\t{3}'.format(*r) if verbose else r[0]
930291
def list(self, sort=False):
        
        prs = self._processors.values()
        if sort:
            return sorted(prs, key=operator.methodcaller("cid"))

        return prs
689546
def list_files(dirname='.', digest=True):
    
    skipdirs = ['__pycache__', '.git', '.svn', 'htmlcov', 'dist', 'build',
                '.idea', 'tasks', 'static', 'media', 'data', 'migrations',
                '.doctrees', '_static', 'node_modules', 'external',
                'jobs', 'tryout', 'tmp', '_coverage',
               ]
    skipexts = ['.pyc', '~', '.svg', '.txt', '.TTF', '.tmp', '.errmail',
                '.email', '.bat', '.dll', '.exe', '.Dll', '.jpg', '.gif',
                '.png', '.ico', '.db', '.md5']
    dirname = str(dirname)
    skipfiles = read_skipfile(dirname)

    def clean_dirs(directories):
        """Remove directories that should be skipped.
        """
        for d in directories:
            if d.endswith('.egg-info'):
                directories.remove(d)
        for d in skipdirs:
            if d in directories:
                directories.remove(d)

    def keep_file(filename, filepath):
        """Returns False if the file should be skipped.
        """
        if filename.startswith('.'):
            return False
        if filepath in skipfiles:
            return False
        for ext in skipexts:
            if filename.endswith(ext):
                return False
        return True

    for root, dirs, files in os.walk(os.path.abspath(dirname)):
        clean_dirs(dirs)
        for fname in files:
            relpth = os.path.relpath(
                os.path.join(root, fname),
                dirname
            ).replace('\\', '/')

            parts = Path(relpth).parts()
            if not keep_file(fname, relpth) or \
                    any(p.startswith('.') for p in parts):
                continue

            pth = os.path.join(dirname, relpth)
            if digest:
                yield md5(open(pth, 'rb').read()).hexdigest(), relpth
            else:
                yield relpth
126611
def list_bzip2 (archive, compression, cmd, verbosity, interactive):
    """"""
    return stripext(cmd, archive, verbosity)
46599
def list_arc (archive, compression, cmd, verbosity, interactive):
    """"""
    cmdlist = [cmd]
    if verbosity > 1:
        cmdlist.append('v')
    else:
        cmdlist.append('l')
    cmdlist.append(archive)
    return cmdlist
1237947
def list_recycle_bin(self, order="time", desc="1", start=0, limit=1000, page=1, **kwargs):
        # Done
        

        params = {
            'start': start,
            'num': limit,
            'dir': '/',
            'order': order,
            'desc': desc,
            'page': page
        }
        url = 'http://{0}/api/recycle/list'.format(BAIDUPAN_SERVER)
        return self._request('recycle', 'list', url=url, extra_params=params, **kwargs)
598063
async function untar(istream, dst){
    // is destination a directory ?
    if (!await _isDirectory(dst)){
        throw Error('Destination is not a valid directory: ' + dst);
    }

    // get instance
    const extract = _tar.extract();

    // list of extracted files
    const items = [];
    
    // wrap into Promise
    return new Promise(function(resolve, reject){

        // process each tar entry!
        extract.on('entry', async function(header, fstream, next){

            // add item to list
            items.push(header.name);

            // directory entry ?
            if (header.type == 'directory'){
                // create subdirectory
                await _mkdirp(_path.join(dst, header.name), header.mode, true);

            // file entry ?
            }else if (header.type == 'file'){
                // redirect content to file
                await _fileOutputStream(fstream, _path.join(dst, header.name), header.mode);
            }

            // next entry
            next();
        });
        
        // listener
        extract.on('finish', function(){
            resolve(items);
        });
        extract.on('error', reject);

        // pipe through extractor
        istream.pipe(extract);
    });
}
1088621
function listDocAsStream (opts) {
      return relax({ db: dbName, path: '_all_docs', qs: opts, stream: true })
    }
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))]
422571
def _list_dir(self):
        
        return [os.path.join(self._path, fn) for fn in os.listdir(self._path)
                if not fn.endswith(self._fs_transaction_suffix)]
1127455
function list(context, err, items, paths) {
    if (err) return fail(context, err);
    
    var long = context.options["l"];
    
    if (typeof long === "undefined") long = (context.command.slice(-3) === "dir");
    
    items.forEach(function (item) {
        if (item.filename == "." || item.filename == "..") return;
        
        if (paths) {
            shell.write(item.path);
        } else if (long) {
            shell.write(item.longname);
        } else {
            shell.write(item.filename);
        }
    });
    
    context.end();
}
662232
def _list_existing(filesystem, glob, paths):
    
    globs = _constrain_glob(glob, paths)
    time_start = time.time()
    listing = []
    for g in sorted(globs):
        logger.debug('Listing %s', g)
        if filesystem.exists(g):
            listing.extend(filesystem.listdir(g))
    logger.debug('%d %s listings took %f s to return %d items',
                 len(globs), filesystem.__class__.__name__, time.time() - time_start, len(listing))
    return set(listing)
1335636
def _listdir(self, path):
        """"""
        if self._user is None:
            return os.listdir(path)
        else:
            args = self._build_cmdline(['/bin/ls', '-1A', path])
            return subprocess.check_output(args, stderr=DEVNULL).decode('utf-8', errors='ignore').split('\n')
681399
def listdir(self, url):
        """"""
        params = self._split_url(url)

        block_blob_service = self._block_blob_service(
            account_name=params["account"], sas_token=params["sas_token"]
        )
        blobs = block_blob_service.list_blobs(params["container"])
        return blobs
1047807
def _list_dir(self, path):
        """"""
        try:
            elements = [
                os.path.join(path, x) for x in os.listdir(path)
            ] if os.path.isdir(path) else []
            elements.sort()
        except OSError:
            elements = None
        return elements
1270004
def listdir(path='.'):
    
    return [name.rstrip('/') for name, _ in
            get_instance(path).list_objects(path, first_level=True)]
271855
def list_lzh (archive, compression, cmd, verbosity, interactive):
    """"""
    cmdlist = [cmd]
    if verbosity > 1:
        cmdlist.append('v')
    else:
        cmdlist.append('l')
    cmdlist.append(archive)
    return cmdlist