Skip to content

FileSystem Utilities

fusion_bench.utils.path

listdir_fullpath(dir)

list directory dir, return fullpaths

Parameters:

  • dir (str) –

    directory name

Returns:

  • List[str]

    List[str]: a list of fullpaths

Source code in fusion_bench/utils/path.py
def listdir_fullpath(dir: str) -> List[str]:
    """list directory `dir`, return fullpaths

    Args:
        dir (str): directory name

    Returns:
        List[str]: a list of fullpaths
    """
    assert os.path.isdir(dir), "Argument 'dir' must be a Directory"
    names = os.listdir(dir)
    return [os.path.join(dir, name) for name in names]