Get a set() of files from a jottapath (a folder)
7480
def filelist(jottapath, JFS):
    """"""
    log.debug("filelist %r", jottapath)
    try:
        jf = JFS.getObject(jottapath)
    except JFSNotFoundError:
        return set() # folder does not exist, so pretend it is an empty folder
    if not isinstance(jf, JFSFolder):
        return False
    return set([f.name for f in jf.files() if not f.is_deleted()])
499249
def get_all(self, path, data=None, limit=100):
        """"""
        return ListResultSet(path=path, data=data or {}, limit=limit)
1317818
def get_files_from_storage(paths):
        """"""
        for path in paths:
            f = default_storage.open(path)
            f.name = os.path.basename(path)
            try:
                yield f
            except ClientError:
                logger.exception("File not found: %s", path)
276520
function getFiles(folder = srcFolder){
  let all = [];
  let f = fs.readdirSync(folder);
  for(file of f){
    all.push(path.join(folder,file))
    if(fs.lstatSync(path.join(folder,file)).isDirectory()){
      all = all.concat(getFiles(path.join(folder,file)));
    }
  }
  return all;
}
1352188
function extractSubset(path, drizzle) {
  const pathBits = splitPath(path);
  const results = R.path(pathBits, drizzle);
  return results;
}
1081301
def collect_dirs(path, max_depth=1, followlinks=True):
    """"""

    if not os.path.isdir(path):
        return []

    o = [path]

    if max_depth == 0:
        return o

    for subdir in os.listdir(path):

        subdir = os.path.join(path, subdir)

        if not os.path.isdir(subdir):
            continue

        o += [subdir]

        if os.path.islink(subdir) and not followlinks:
            continue

        if max_depth > 0:
            o += collect_dirs(subdir, max_depth=max_depth - 1)

    return list(set(o))
425013
private static Collection<Path> toPaths(Collection<File> files) {
		return Collections2.transform(files, FUNCTION_FILE_2_PATH);
	}
451002
def paths(self):
        """"""
        if self.format is None:
            raise ArcanaFileFormatError(
                "Cannot get paths of fileset ({}) that hasn't had its format "
                "set".format(self))
        if self.format.directory:
            return chain(*((op.join(root, f) for f in files)
                           for root, _, files in os.walk(self.path)))
        else:
            return chain([self.path], self.aux_files.values())
67693
private static void getFilesByNameRecursive(Collection<File> filesList, File path, String name)
    {
        Optional.ofNullable(path.listFiles()).ifPresent(files -> Arrays.asList(files).forEach(content ->
        {
            if (content.isFile() && content.getName().equals(name))
            {
                filesList.add(content);
            }
            else if (content.isDirectory())
            {
                getFilesByNameRecursive(filesList, content, name);
            }
        }));
    }
303409
def _get_filepaths(self):
        """"""
        self._printer(str(self.__len__()) + " file paths have been parsed in " + str(self.timer.end))
        if self._hash_files:
            return pool_hash(self.filepaths)
        else:
            return self.filepaths
749720
def get_files(self, path):
        

        if os.path.isfile(path):
            self.logger.debug('Called with single file as target: {0}'.format(path))
            yield path
            return

        self.logger.debug('Getting list of files in {0}'.format(path))

        try:
            for f in os.listdir(path):
                cur_file = os.path.join(path, f)
                if f[0] != '.' and os.path.isfile(cur_file):
                    yield cur_file
        except OSError:
            self.logger.error('Could not read files from {0}'.format(path))
            raise
473997
def from_folder(cls, path:PathOrStr, extensions:Collection[str]=None, recurse:bool=True,
                    include:Optional[Collection[str]]=None, processor:PreProcessors=None, **kwargs)->'ItemList':
        """"""
        path = Path(path)
        return cls(get_files(path, extensions, recurse=recurse, include=include), path=path, processor=processor, **kwargs)
977350
def get_jottapath(localtopdir, dirpath, jottamountpoint):
    """"""
    log.debug("get_jottapath %r %r %r", localtopdir, dirpath, jottamountpoint)
    normpath =  posixpath.normpath(posixpath.join(jottamountpoint, posixpath.basename(localtopdir),
                                   posixpath.relpath(dirpath, localtopdir)))
    return _decode_filename_to_unicode(normpath)
541737
def _list_files(self, path):
        """"""
        files = []
        for f in glob.glob(pathname=path):
            files.append(f)
        files.sort()
        return files
1170702
def _get_files(self, folderId):
        """"""
        uri = '/'.join([self.base_url, self.name, folderId, 'Files'])
        return uri, {}, 'get', None, None, False, None
1098409
def mkdir(jottapath, JFS):
    """"""
    jf = JFS.post('%s?mkDir=true' % jottapath)
    return instanceof(jf, JFSFolder)
1008229
def list_items(path_to_directory, pattern, wanted):
    """"""
    if not path_to_directory:
        return set()
    needed = make_needed(pattern, path_to_directory, wanted)
    return [os.path.join(path_to_directory, name)
            for name in _names_in_directory(path_to_directory)
            if needed(name)]