From cbf658f83d206bf340ab4aa8eab02b058e9b293f Mon Sep 17 00:00:00 2001 From: Elijah Duffy Date: Wed, 10 Nov 2021 10:10:20 -0800 Subject: Lua API: Add `rmdir`, `cpdir` and `mvdir` (#9638) Co-authored-by: rubenwardy --- doc/lua_api.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') 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, -- cgit v1.2.3