diff options
author | Elijah Duffy <enduffy2014@outlook.com> | 2021-11-10 10:10:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 19:10:20 +0100 |
commit | cbf658f83d206bf340ab4aa8eab02b058e9b293f (patch) | |
tree | 88d88074d7c8f229c7d393746747ad67d29860b9 /doc | |
parent | 6db914780ed6e27d9876763d561ea0daafe01f4f (diff) | |
download | minetest-cbf658f83d206bf340ab4aa8eab02b058e9b293f.tar.gz minetest-cbf658f83d206bf340ab4aa8eab02b058e9b293f.tar.bz2 minetest-cbf658f83d206bf340ab4aa8eab02b058e9b293f.zip |
Lua API: Add `rmdir`, `cpdir` and `mvdir` (#9638)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index f3007671b..3b9f4c339 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -4624,6 +4624,19 @@ Utilities * `minetest.mkdir(path)`: returns success. * Creates a directory specified by `path`, creating parent directories if they don't exist. +* `minetest.rmdir(path, recursive)`: returns success. + * Removes a directory specified by `path`. + * If `recursive` is set to `true`, the directory is recursively removed. + Otherwise, the directory will only be removed if it is empty. + * Returns true on success, false on failure. +* `minetest.cpdir(source, destination)`: returns success. + * Copies a directory specified by `path` to `destination` + * Any files in `destination` will be overwritten if they already exist. + * Returns true on success, false on failure. +* `minetest.mvdir(source, destination)`: returns success. + * Moves a directory specified by `path` to `destination`. + * If the `destination` is a non-empty directory, then the move will fail. + * Returns true on success, false on failure. * `minetest.get_dir_list(path, [is_dir])`: returns list of entry names * is_dir is one of: * nil: return all entries, |