summaryrefslogtreecommitdiff
path: root/extension/examples/filesystem/real.py
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-27 23:53:08 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-27 23:53:08 -0700
commit4411dc39c1ec51bfc96c4059aa555313e825c2f7 (patch)
treef88425c9c5b407d53cc49645e13ebbb52c9fb455 /extension/examples/filesystem/real.py
parent55e231b4f51f47757ab5840363fbc097d6ebf6e5 (diff)
downloadsncontinue-4411dc39c1ec51bfc96c4059aa555313e825c2f7.tar.gz
sncontinue-4411dc39c1ec51bfc96c4059aa555313e825c2f7.tar.bz2
sncontinue-4411dc39c1ec51bfc96c4059aa555313e825c2f7.zip
v73 was too large, removing examples, .vscignore
Diffstat (limited to 'extension/examples/filesystem/real.py')
-rw-r--r--extension/examples/filesystem/real.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/extension/examples/filesystem/real.py b/extension/examples/filesystem/real.py
deleted file mode 100644
index ec7aa693..00000000
--- a/extension/examples/filesystem/real.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import os
-from typing import List
-from filesystem.filesystem import FileSystem
-
-
-class RealFileSystem(FileSystem):
- """A filesystem that reads/writes from the actual filesystem."""
-
- def read(self, path) -> str:
- with open(path, "r") as f:
- return f.read()
-
- def readlines(self, path) -> List[str]:
- with open(path, "r") as f:
- return f.readlines()
-
- def write(self, path, content):
- with open(path, "w") as f:
- f.write(content)
-
- def exists(self, path) -> bool:
- return os.path.exists(path)
-
- def rename_file(self, filepath: str, new_filepath: str):
- os.rename(filepath, new_filepath)
-
- def rename_directory(self, path: str, new_path: str):
- os.rename(path, new_path)
-
- def delete_file(self, filepath: str):
- os.remove(filepath)
-
- def add_directory(self, path: str):
- os.makedirs(path)