Getting all the files in a folder.

    Args:
    -----
        path: The path in which looking for the files

    Returns:
    --------
        list: The list of filenames found.
541524
def getFilesFromAFolder(path):
    
    from os import listdir
    from os.path import isfile, join
    #onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
    onlyFiles = []
    for f in listdir(path):
        if isfile(join(path, f)):
            onlyFiles.append(f)
    return onlyFiles
597825
def list(path, filename=None, start=None, stop=None, recursive=False, directories=False):
        
        path = uri_to_path(path)

        if not filename and recursive:
            return listrecursive(path)

        if filename:
            if os.path.isdir(path):
                path = os.path.join(path, filename)
            else:
                path = os.path.join(os.path.dirname(path), filename)
        else:
            if os.path.isdir(path) and not directories:
                path = os.path.join(path, "*")

        files = glob.glob(path)

        if not directories:
            files = [fpath for fpath in files if not os.path.isdir(fpath)]

        files.sort()
        files = select(files, start, stop)
        return files
22099
def file_to_list(path):
    
    if not os.path.exists(path):
        ui.error(c.MESSAGES["path_missing"], path)
        sys.exit(1)

    with codecs.open(path, "r", "UTF-8") as contents:
        lines = contents.read().splitlines()

    return lines
175822
def get_files(path):
    
    return_files = []
    for root, dirs, files in os.walk(path):

        # Skip hidden files
        files = [f for f in files if not f[0] == '.']
        dirs[:] = [d for d in dirs if not d[0] == '.']

        for filename in files:
            return_files.append(os.path.join(root, filename))
    return return_files
591706
function files(path, ...matchers) {
	if ( matchers.length ) {
		return listFiles(path.replace(/\\/g, '/'), matchers);
	}

	let rs = [];
	if( isDirectoryExists(path) ) {
		let ls = fs.readdirSync(path);
		ls.forEach((file, index) => rs.push(path + "/" + file));
	}
	return rs;
}
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
145768
def get_child_files(path):
        '''  '''
        path = FileHelper.abspath(path)
        return [filename for filename in os.listdir(path) if os.path.isfile(os.path.join(path, filename))]
138077
public static List<File> getDirectories(File path)
    {
        Check.notNull(path);

        return Optional.ofNullable(path.listFiles())
                       .map(files -> Arrays.asList(files)
                                           .stream()
                                           .filter(File::isDirectory)
                                           .collect(Collectors.toList()))
                       .orElseGet(Collections::emptyList);
    }
1114106
def list_dir_abspath(path):
    
    return map(lambda f: os.path.join(path, f), os.listdir(path))
914615
def gather_files(self):
        
        self.all_files = utils.files_in_path(self.paths["role"])

        return len(self.all_files)
652555
def list_images(path=['.']):
    
    for image_dir in set(path):
        if not os.path.isdir(image_dir):
            continue
        for filename in os.listdir(image_dir):
            bname, ext = os.path.splitext(filename)
            if ext.lower() not in VALID_IMAGE_EXTS:
                continue

            filepath = os.path.join(image_dir, filename)
            yield strutils.decode(filepath)
995076
def all_files(file_or_directory):
    ''
    if os.path.isdir(file_or_directory):
        return [os.path.join(dirname, filename)
                for dirname, dirnames, filenames in os.walk(file_or_directory)
                for filename in filenames]
    else:
        return [file_or_directory]
390095
def _iter_full_paths(path_list):
    
    for path in path_list:
        if not os.path.isdir(path):
            full_path = os.path.realpath(path)
            yield path
        else:
            for root, dirs, filenames in os.walk(path):
                for filename in filenames:
                    full_path = os.path.realpath(os.path.join(root, filename))
                    yield full_path
410399
def list_path(root_dir):
    
    res = []
    if os.path.isdir(root_dir):
        for name in os.listdir(root_dir):
            res.append(name)
    return res
541737
def _list_files(self, path):
        """"""
        files = []
        for f in glob.glob(pathname=path):
            files.append(f)
        files.sort()
        return files
1270004
def listdir(path='.'):
    
    return [name.rstrip('/') for name, _ in
            get_instance(path).list_objects(path, first_level=True)]
474166
def pathNames(self) -> [str]:
        

        return [f.pathName for f in list(self._files.values())]