diff --git a/docs/Lua API.rst b/docs/Lua API.rst index 2cfaff350..c62d0f379 100644 --- a/docs/Lua API.rst +++ b/docs/Lua API.rst @@ -2093,6 +2093,11 @@ unless otherwise noted. Creates a new directory. Returns ``false`` if unsuccessful, including if ``path`` already exists. +* ``dfhack.filesystem.mkdir_recursive(path)`` + + Creates a new directory, including any intermediate directories that don't exist yet. + Returns ``true`` if the folder was created or already existed, or ``false`` if unsuccessful. + * ``dfhack.filesystem.rmdir(path)`` Removes a directory. Only works if the directory is already empty. diff --git a/docs/changelog.txt b/docs/changelog.txt index 6db43ad64..9d03b1f0a 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -50,6 +50,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - `blueprint`: now automatically creates folder trees when organizing blueprints into subfolders (e.g. ``blueprint 30 30 1 rooms/dining dig`` will create the file ``blueprints/rooms/dining-dig.csv``); previously it would fail if the ``blueprints/rooms/`` directory didn't already exist - `confirm`: added a confirmation dialog for convicting dwarves of crimes +## API +- Added ``Filesystem::mkdir_recursive`` + ## Lua - Added a ``ref_target`` field to primitive field references, corresponding to the ``ref-target`` XML attribute