mmeval.fileio.join_path¶
- mmeval.fileio.join_path(filepath: Union[str, pathlib.Path], *filepaths: Union[str, pathlib.Path], backend_args: Optional[dict] = None) → Union[str, pathlib.Path][source]¶
Concatenate all file paths.
Join one or more filepath components intelligently. The return value is the concatenation of filepath and any members of *filepaths.
- Parameters
filepath (str or Path) – Path to be concatenated.
*filepaths (str or Path) – Other paths to be concatenated.
backend_args (dict, optional) – Arguments to instantiate the corresponding backend. Defaults to None.
- Returns
The result of concatenation.
- Return type
str
Examples
>>> filepath1 = '/path/of/dir1' >>> filepath2 = 'dir2' >>> filepath3 = 'path/of/file' >>> join_path(filepath1, filepath2, filepath3) '/path/of/dir/dir2/path/of/file'