From 00037315175801236fabf498a2d5ed32da4f6356 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 22 Feb 2025 10:50:59 +0100 Subject: [PATCH] Berry add 'path.rename()' --- docs/Berry.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Berry.md b/docs/Berry.md index cd048b239b..4fba5f35c4 100644 --- a/docs/Berry.md +++ b/docs/Berry.md @@ -880,11 +880,12 @@ Tasmota Function|Parameters and details path.exists|`(file_name:string) -> bool`
Returns `true` if the file exists. You don't need to prefix with `/`, as it will automatically be added if the file does not start with `/` path.last_modified|`(file_name:string) -> int`
Returns the timestamp when the file was last modified, or `nil` if the file does not exist. You don't need to prefix with `/`, as it will automatically be added if the file does not start with `/` path.listdir|`(dir_name:string) -> list(string)`
List a directory, typically root dir `"/"` and returns a list of filenames in the directory. Returns an empty list if the directory is invalid -path.remove|`(file_name:string) -> bool`
Deletes a file by name, return `true` if successful +path.remove|`(file_name:string) -> bool`
Deletes a file by name, return `true` if successful
A folder needs to be empty or a `false` is returned. path.format|`(true:bool) -> bool`
Re-formats the LittleFS file system (internal ESP32 flash) and erases all content. The parameter needs to be true as to avoid unwanted calls. Returns true if reformatting was successful.
This is sometimes useful when the file-system becomes unstable or corrupt after multiple re-partitionings. path.mkdir|`(dir_name:string) -> bool`
Creates a directory, return `true` if successful path.rmdir|`(dir_name:string) -> bool`
Deletes a directory if empty, return `true` if successful path.isdir|`(name:string) -> bool`
Checks if path name is a directory +path.rename|`(name1:string, name2:string) -> bool`
Rename file or folder `name1` into `name2`, return `true` if succesful ### `persist` module