Return a list of *all* files & dirs in the repo.

        Think of this as a recursive `ls` command from the root of the repo.
331067
def ls(self):
        
        tree = self.ls_tree()
        return [t.get('file') for t in tree if t.get('file')]
288066
def get_file_list(wildcard):
    
    files = glob.glob(os.path.expanduser(wildcard))
    return files
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
1081123
def list_staged_files(self) -> typing.List[str]:
        
        staged_files: typing.List[str] = [x.a_path for x in self.repo.index.diff('HEAD')]
        LOGGER.debug('staged files: %s', staged_files)
        return staged_files
1119207
def repo_dirlist():
    

    for d in os.listdir(settings.upkg_destdir):
        dp = os.path.join(settings.upkg_destdir, d)
        # logger.debug("%s", dp)
        if os.path.isdir(dp) and d[0] != '.':
            # logger.debug("adding %s", dp)
            yield {'base': d, 'root': settings.upkg_destdir,
                   'path': dp}
185778
def allfiles(self):
        
        for f in self.files:
            yield f
        for f in self.extra_files:
            yield f
759369
def installed_list(cls):
        
        logger.debug("")

        res = []
        for x in repo_dirlist():
            d = x['path']
            try:
                res.append(Repo(repo_dir=d, name=x['base']))
            except InvalidRepo:
                logger.warning("Invalid repo '%s' in the installation directory.", d)

        return res
463686
def files(self):
        
        return [
            os.path.join(self.root, label, name)
            for label in self.labels
            for name in os.listdir(os.path.join(self.root, label))
        ]
1300305
def read_dirs(path, folder):
    '''
     
    '''
    lbls, fnames, all_lbls = [], [], []
    full_path = os.path.join(path, folder)
    for lbl in sorted(os.listdir(full_path)):
        if lbl not in ('.ipynb_checkpoints','.DS_Store'):
            all_lbls.append(lbl)
            for fname in os.listdir(os.path.join(full_path, lbl)):
                if fname not in ('.DS_Store'):
                    fnames.append(os.path.join(folder, lbl, fname))
                    lbls.append(lbl)
    return fnames, lbls, all_lbls
71604
def recursively_get_files_from_directory(directory):
    
    return [
        os.path.join(root, filename)
        for root, directories, filenames in os.walk(directory)
        for filename in filenames
    ]
1233942
def _get_files_recursively(rootdir):
    
    output = []
    for root, dirs, files in os.walk(rootdir):
        for filename in files:
            output.append(os.path.join(root, filename))

    return output
444384
def files(self):
        
        # If no files but a recursion option ==> use the current directory
        if not self.args.files and self.recursive:
            return ['.']
        else:
            return self.args.files
256246
def list_files(dir_path, recursive=True):
    

    for root, dirs, files in os.walk(dir_path):
        file_list = [os.path.join(root, f) for f in files]
        if recursive:
            for dir in dirs:
                dir = os.path.join(root, dir)
                file_list.extend(list_files(dir, recursive=True))
        return file_list
226866
def archive_all_files(self, archiver):
        
        for file_path in self.extra:
            archiver(path.abspath(file_path), path.join(self.prefix, file_path))

        for file_path in self.walk_git_files():
            archiver(path.join(self.main_repo_abspath, file_path), path.join(self.prefix, file_path))
801673
def find_files_for_use(self, all_files):
        
        for path in all_files:
            # Find the path relative to the parent dir
            relpath = self.relpath_for(path)

            # Don't care about the ./
            if relpath.startswith("./"):
                relpath = relpath[2:]

            # Only care about paths that aren't filtered
            if not self.is_filtered(relpath):
                yield Path(path, relpath)
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
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]