SaverDefault
ClassAbstractSource
SaverDefault()
This is an abstract class requiring further implementation.
The default implementation of the file saver. It can be overriden if special customization is required.
Arguments
Initialization function is not specified.
Methods
save_bytes
self.save_bytes(file_path: str | PathLike[str], data: bytes)
Save the binary data.
Requires
| Name | Type | Required | |
|---|---|---|---|
file_path | str | PathLike[str] | The path to the output file. | |
data | bytes | The byte data to be saved. |
save_data
self.save_data(file_path: str | PathLike[str], data: Any)
Save the structured data (such as json).
Requires
| Name | Type | Required | |
|---|---|---|---|
file_path | str | PathLike[str] | The path to the output file. | |
data | Any | The structured data to be saved. |
save_text
self.save_text(file_path: str | PathLike[str], data: str)
Save the text file.
Requires
| Name | Type | Required | |
|---|---|---|---|
file_path | str | PathLike[str] | The path to the output file. | |
data | str | The text data to be saved. |