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, ...])
| 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) |