|
@@ -1,10 +1,10 @@
|
|
|
-from pathlib import Path
|
|
|
from dataclasses import dataclass
|
|
|
from os import stat_result
|
|
|
+from pathlib import Path
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
-class VirtualStats:
|
|
|
+class FakeStats:
|
|
|
st_mode: int
|
|
|
st_ino: int
|
|
|
st_dev: int
|
|
@@ -18,13 +18,16 @@ class VirtualStats:
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
-class VirtualPathEntry:
|
|
|
+class FakePathEntry:
|
|
|
is_dir: bool
|
|
|
is_file: bool
|
|
|
stat: stat_result
|
|
|
|
|
|
|
|
|
-class VirtualPath(Path):
|
|
|
+class FakePath(Path):
|
|
|
+ def absolute(self):
|
|
|
+ pass
|
|
|
+
|
|
|
def cwd(self):
|
|
|
pass
|
|
|
|
|
@@ -43,15 +46,45 @@ class VirtualPath(Path):
|
|
|
def iterdir(self):
|
|
|
pass
|
|
|
|
|
|
+ def joinpath(self):
|
|
|
+ pass
|
|
|
+
|
|
|
def lstat(self):
|
|
|
return self.stat()
|
|
|
|
|
|
def open(self):
|
|
|
pass
|
|
|
|
|
|
+ def parent(self):
|
|
|
+ pass
|
|
|
+
|
|
|
+ def parents(self):
|
|
|
+ pass
|
|
|
+
|
|
|
+ def read_bytes(self):
|
|
|
+ pass
|
|
|
+
|
|
|
+ def read_text(self):
|
|
|
+ pass
|
|
|
+
|
|
|
+ def rglob(self):
|
|
|
+ pass
|
|
|
+
|
|
|
def stat(self):
|
|
|
pass
|
|
|
|
|
|
+ def root(self):
|
|
|
+ pass
|
|
|
+
|
|
|
+ def stem(self):
|
|
|
+ pass
|
|
|
+
|
|
|
+ def suffix(self):
|
|
|
+ pass
|
|
|
+
|
|
|
+ def suffixes(self):
|
|
|
+ pass
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -65,3 +98,7 @@ class VirtualPath(Path):
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+if __name__ == "__main__":
|
|
|
+ p = Path(".")
|
|
|
+ print(p)
|