await
) and return promises/futures. The storage system can notify clients when files are created, updated, or deleted via events, enabling real-time synchronization or UI updates.
file.updated
path
argument identifying the file’s location in storage.file_deleted
path
argument identifying the file’s location in storage.await
the call.
exists(path)
path
(str): The path to check.True
if the file or folder exists; False
otherwise.open(path, overwrite=False)
overwrite
is True
, an existing file at this path will be truncated.
Parameters
path
(str): The file path to open or create.overwrite
(bool, optional): Whether to overwrite if the file already exists. Defaults to False
.write
and close
.write(handle, data)
handle
(file handle): The handle returned by open
.data
(bytes): The data to write.None
close(handle)
handle
(file handle): The handle to close.None
download(path)
path
(str): The file path to download..data
property.download_url(path)
path
(str): The file path to retrieve a download URL for.list(path)
path
(str): The folder path to list.name
and is_folder
property.delete(path)
file.deleted
event is typically emitted afterward.
Parameters
path
(str): The file path to delete.None
file.deleted
event.