Home
Overview
Fundamentals
Glossary
Cheatsheet
API Reference
Quick Recipes
Deep Dive
Common Pitfalls and Gotchas
Persistent Storage
Interface to interact with the file system.
FileSystemInterface.exists(self, filepath: str) -> boolNo description
FileSystemInterface.glob(self, pattern: str) -> Collection[str]No description
FileSystemInterface.is_dir(self, filepath: str) -> boolNo description
FileSystemInterface.make_dirs(self, dirpath: str)No description
FileSystemInterface.open(self, filepath: str, mode: str) -> IO[bytes | str]No description
FileSystemInterface.remove(self, filepath: str)No description
FileSystemInterface.rename(self, oldpath: str, newpath: str, overwrite: bool = False)Rename or move a file or a directory.
Atomicity should be an aspirational goal for implementations, especially for
file-to-file renaming. It is unfortunately not an API guarantee at present.
Args:
oldpath: the file or directory to be moved.
newpath: the new name of the file or directory.
overwrite: boolean; if False, it is an error for newpath to be occupied by
an existing file or directory.