We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65cbe0e commit eeebf51Copy full SHA for eeebf51
upath/core.py
@@ -945,6 +945,9 @@ def home(cls) -> UPath:
945
def absolute(self) -> Self:
946
return self
947
948
+ def is_absolute(self) -> bool:
949
+ return self._flavour.isabs(str(self))
950
+
951
def resolve(self, strict: bool = False) -> Self:
952
_parts = self.parts
953
upath/tests/cases.py
@@ -115,6 +115,9 @@ def test_is_file(self):
115
116
assert not (self.path / "not-existing-file.txt").is_file()
117
118
+ def test_is_absolute(self):
119
+ assert self.path.is_absolute() is True
120
121
def test_is_mount(self):
122
assert self.path.is_mount() is False
123
0 commit comments