Return the path as a URI.
(self)
| 1460 | return cls(homedir) |
| 1461 | |
| 1462 | def as_uri(self): |
| 1463 | """Return the path as a URI.""" |
| 1464 | if not self.is_absolute(): |
| 1465 | raise ValueError("relative paths can't be expressed as file URIs") |
| 1466 | from urllib.request import pathname2url |
| 1467 | return pathname2url(str(self), add_scheme=True) |
| 1468 | |
| 1469 | @classmethod |
| 1470 | def from_uri(cls, uri): |