pathlib-next 0.1.4__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/PKG-INFO +1 -1
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/pyproject.toml +1 -1
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/mempath.py +7 -5
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/.gitignore +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/LICENSE +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/README.md +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/example.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/__init__.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/fspath.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/path.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/uri/__init__.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/uri/query.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/uri/schemes/__init__.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/uri/schemes/file.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/uri/schemes/http.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/uri/schemes/sftp.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/uri/source.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/utils/__init__.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/utils/glob.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/utils/stat.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/src/pathlib_next/utils/sync.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/tests/test_local.py +0 -0
- {pathlib_next-0.1.4 → pathlib_next-0.1.5}/tests/test_uri.py +0 -0
|
@@ -48,10 +48,10 @@ class MemPath(Path):
|
|
|
48
48
|
self._normalized = None
|
|
49
49
|
|
|
50
50
|
def __repr__(self):
|
|
51
|
-
return "{}({!r})".format(type(self).__name__, self.
|
|
51
|
+
return "{}({!r})".format(type(self).__name__, self.as_posix())
|
|
52
52
|
|
|
53
53
|
def __str__(self) -> str:
|
|
54
|
-
return self.
|
|
54
|
+
return self.as_posix()
|
|
55
55
|
|
|
56
56
|
@property
|
|
57
57
|
def backend(self):
|
|
@@ -61,7 +61,7 @@ class MemPath(Path):
|
|
|
61
61
|
def normalized(self):
|
|
62
62
|
if self._normalized is None:
|
|
63
63
|
self._normalized = (
|
|
64
|
-
_posix.normpath(
|
|
64
|
+
_posix.normpath(self.as_posix())
|
|
65
65
|
.removeprefix(".")
|
|
66
66
|
.removeprefix("/")
|
|
67
67
|
.split("/")
|
|
@@ -90,8 +90,10 @@ class MemPath(Path):
|
|
|
90
90
|
return type(self)(*segments, backend=self.backend)
|
|
91
91
|
|
|
92
92
|
def as_uri(self):
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
return f"mempath:{_urlquote(self.as_posix())}"
|
|
94
|
+
|
|
95
|
+
def as_posix(self):
|
|
96
|
+
return "/".join(self.segments)
|
|
95
97
|
|
|
96
98
|
def _parent_container(self) -> tuple[dict[str, bytearray], str]:
|
|
97
99
|
parent = self.backend
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|