Skip to content

Commit

Permalink
keep the listdir_recursive doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Jan 7, 2025
1 parent 3239042 commit 22da764
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions docs/dev/Lua API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3155,15 +3155,14 @@ unless otherwise noted.

* ``dfhack.filesystem.listdir_recursive(path [, depth = 10[, include_prefix = true]])``

Lists all files/directories in a directory and its subdirectories. All directories
are listed before their contents. Returns a table with subtables of the format::

{path: 'path to file', isdir: true|false}

Note that ``listdir()`` returns only the base name of each directory entry, while
``listdir_recursive()`` returns the initial path and all components following it
for each entry. Set ``include_prefix`` to false if you don't want the ``path``
string prepended to the returned filenames.
Lists all files/directories in a directory and its subdirectories. All
directories are listed before their contents. Returns a table with subtables
of the format: ``{path: 'path to file', isdir: true|false}``

Note that ``listdir()`` returns only the base name of each directory entry,
while ``listdir_recursive()`` returns the initial path and all components
following it for each entry. Set ``include_prefix`` to false if you don't
want the ``path`` string prepended to the returned filenames.

Console API
-----------
Expand Down

0 comments on commit 22da764

Please sign in to comment.