module documentation
Storage tools for the agent.
| Function | storage |
List the contents of a directory on the SD card. |
| Function | storage |
Create a directory on the SD card. |
| Function | storage |
Read the contents of a file from the SD card. |
| Function | storage |
Remove a file or directory from the SD card. |
| Function | storage |
Write data to a file on the SD card. |
| Constant | TOOL |
Undocumented |
| Constant | TOOL |
Undocumented |
| Constant | TOOL |
Undocumented |
| Constant | TOOL |
Undocumented |
| Constant | TOOL |
Undocumented |
List the contents of a directory on the SD card.
| Parameters | |
viewViewManager | The view manager for storage access. |
dirstr | The directory path. |
| Returns | |
list[str] | A list of filenames. |
Create a directory on the SD card.
| Parameters | |
viewViewManager | The view manager for storage access. |
dirstr | The directory path to create. |
| Returns | |
bool | True on success. |
Read the contents of a file from the SD card.
| Parameters | |
viewViewManager | The view manager for storage access. |
filestr | The file path. |
mode:str | The read mode. Defaults to "r". |
index:int | The byte index to start from. Defaults to 0. |
count:int | The number of bytes to read. Defaults to 0. |
| Returns | |
str or bytes | The file contents. |
Remove a file or directory from the SD card.
| Parameters | |
viewViewManager | The view manager for storage access. |
filestr | The path to remove. |
| Returns | |
bool | True on success. |
Write data to a file on the SD card.
| Parameters | |
viewViewManager | The view manager for storage access. |
filestr | The file path. |
data:str or bytes | The data to write. |
mode:str | The write mode. Defaults to "w". |
| Returns | |
bool | True on success. |
TOOL_STORAGE_LISTDIR =
¶
Undocumented
| Value |
|
TOOL_STORAGE_MKDIR =
¶
Undocumented
| Value |
|
TOOL_STORAGE_READ =
¶
Undocumented
| Value |
|
TOOL_STORAGE_REMOVE =
¶
Undocumented
| Value |
|
TOOL_STORAGE_WRITE =
¶
Undocumented
| Value |
|