FileSystem Utilities¶
fusion_bench.utils.path
¶
create_symlink(src_dir, dst_dir, link_name=None)
¶
Creates a symbolic link from src_dir to dst_dir.
Parameters:
-
src_dir
(str
) –The source directory to link to.
-
dst_dir
(str
) –The destination directory where the symlink will be created.
-
link_name
(str
, default:None
) –The name of the symlink. If None, uses the basename of src_dir.
Raises:
-
OSError
–If the symbolic link creation fails.
-
ValueError
–If src_dir does not exist or is not a directory.
Source code in fusion_bench/utils/path.py
listdir_fullpath(dir)
¶
list directory dir
, return fullpaths
Parameters:
-
dir
(str
) –directory name
Returns:
-
List[str]
–List[str]: a list of fullpaths