filestore.py 501 B

123456789101112131415161718
  1. from openhands.storage.files import FileStore
  2. class E2BFileStore(FileStore):
  3. def __init__(self, filesystem):
  4. self.filesystem = filesystem
  5. def write(self, path: str, contents: str) -> None:
  6. self.filesystem.write(path, contents)
  7. def read(self, path: str) -> str:
  8. return self.filesystem.read(path)
  9. def list(self, path: str) -> list[str]:
  10. return self.filesystem.list(path)
  11. def delete(self, path: str) -> None:
  12. self.filesystem.delete(path)