Shortcuts

mmengine.fileio.join_path

mmengine.fileio.join_path(filepath, *filepaths, backend_args=None)[源代码]

Concatenate all file paths.

Join one or more filepath components intelligently. The return value is the concatenation of filepath and any members of *filepaths.

参数:
  • 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.

返回:

The result of concatenation.

返回类型:

str

示例

>>> filepath1 = '/path/of/dir1'
>>> filepath2 = 'dir2'
>>> filepath3 = 'path/of/file'
>>> join_path(filepath1, filepath2, filepath3)
'/path/of/dir/dir2/path/of/file'
Read the Docs v: latest
Versions
latest
stable
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.1
v0.9.0
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.