pyrit.models.StorageIO#
- class StorageIO[source]#
Bases:
ABCAbstract interface for storage systems (local disk, Azure Storage Account, etc.).
- __init__()#
Methods
__init__()Asynchronously creates a directory or equivalent in the storage system if it doesn't exist.
is_file(path)Asynchronously checks if the path refers to a file (not a directory or container).
path_exists(path)Asynchronously checks if a file or blob exists at the given path.
read_file(path)Asynchronously reads the file (or blob) from the given path.
write_file(path, data)Asynchronously writes data to the given path.
- abstract async create_directory_if_not_exists(path: Path | str) None[source]#
Asynchronously creates a directory or equivalent in the storage system if it doesn’t exist.
- abstract async is_file(path: Path | str) bool[source]#
Asynchronously checks if the path refers to a file (not a directory or container).
- abstract async path_exists(path: Path | str) bool[source]#
Asynchronously checks if a file or blob exists at the given path.