MCPcopy
hub / github.com/huggingface/datasets / joinpath

Method joinpath

src/datasets/utils/file_utils.py:1203–1212  ·  view source on GitHub ↗

Extend :func:`xjoin` to support argument of type :obj:`~pathlib.Path`. Args: *p (`tuple` of `str`): Other path components. Returns: [`xPath`]

(self, *p: tuple[str, ...])

Source from the content-addressed store, hash-verified

1201 return xopen(str(self), *args, **kwargs)
1202
1203 def joinpath(self, *p: tuple[str, ...]) -> "xPath":
1204 """Extend :func:`xjoin` to support argument of type :obj:`~pathlib.Path`.
1205
1206 Args:
1207 *p (`tuple` of `str`): Other path components.
1208
1209 Returns:
1210 [`xPath`]
1211 """
1212 return type(self)(xjoin(self.as_posix(), *p))
1213
1214 def __truediv__(self, p: str) -> "xPath":
1215 return self.joinpath(p)

Callers 2

__truediv__Method · 0.95
test_xjoinFunction · 0.80

Calls 1

xjoinFunction · 0.85

Tested by 1

test_xjoinFunction · 0.64