wip: various details

This commit is contained in:
Yannik Schmidt
2024-02-24 19:06:56 +01:00
parent 281c253476
commit d9d63bfe01
5 changed files with 61 additions and 22 deletions

View File

@@ -30,11 +30,14 @@ class DataBackend:
class LocalFS(DataBackend):
def get(self, path):
fullpath = os.path.join(self.remote_root_dir, path)
with open(fullpath, "rb") as f:
target = os.path.join(self.cache_dir, os.path.basename(path))
with open(target, "wb") as ft:
ft.write(f.read())
return target
def list(self, path):
fullpath = os.path.join(self.remote_root_dir, path)