chore: avoid hardcoding file paths via MIMI_SPIFFS_BASE
Use MIMI_SPIFFS_BASE to centralize file path definitions, making the base path configurable instead of hardcoded. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -5,24 +5,24 @@
|
||||
|
||||
/**
|
||||
* Read a file from SPIFFS.
|
||||
* Input JSON: {"path": "/spiffs/..."}
|
||||
* Input JSON: {"path": "<MIMI_SPIFFS_BASE>/..."}
|
||||
*/
|
||||
esp_err_t tool_read_file_execute(const char *input_json, char *output, size_t output_size);
|
||||
|
||||
/**
|
||||
* Write/overwrite a file on SPIFFS.
|
||||
* Input JSON: {"path": "/spiffs/...", "content": "..."}
|
||||
* Input JSON: {"path": "<MIMI_SPIFFS_BASE>/...", "content": "..."}
|
||||
*/
|
||||
esp_err_t tool_write_file_execute(const char *input_json, char *output, size_t output_size);
|
||||
|
||||
/**
|
||||
* Find-and-replace edit a file on SPIFFS.
|
||||
* Input JSON: {"path": "/spiffs/...", "old_string": "...", "new_string": "..."}
|
||||
* Input JSON: {"path": "<MIMI_SPIFFS_BASE>/...", "old_string": "...", "new_string": "..."}
|
||||
*/
|
||||
esp_err_t tool_edit_file_execute(const char *input_json, char *output, size_t output_size);
|
||||
|
||||
/**
|
||||
* List files on SPIFFS, optionally filtered by path prefix.
|
||||
* Input JSON: {"prefix": "/spiffs/..."} (prefix is optional)
|
||||
* Input JSON: {"prefix": "<MIMI_SPIFFS_BASE>/..."} (prefix is optional)
|
||||
*/
|
||||
esp_err_t tool_list_dir_execute(const char *input_json, char *output, size_t output_size);
|
||||
|
||||
Reference in New Issue
Block a user