@@ -3155,15 +3155,14 @@ unless otherwise noted.
31553155
31563156* ``dfhack.filesystem.listdir_recursive(path [, depth = 10[, include_prefix = true]]) ``
31573157
3158- Lists all files/directories in a directory and its subdirectories. All directories
3159- are listed before their contents. Returns a table with subtables of the format::
3158+ Lists all files/directories in a directory and its subdirectories. All
3159+ directories are listed before their contents. Returns a table with subtables
3160+ of the format: ``{path: 'path to file', isdir: true|false} ``
31603161
3161- {path: 'path to file', isdir: true|false}
3162-
3163- Note that ``listdir() `` returns only the base name of each directory entry, while
3164- ``listdir_recursive() `` returns the initial path and all components following it
3165- for each entry. Set ``include_prefix `` to false if you don't want the ``path ``
3166- string prepended to the returned filenames.
3162+ Note that ``listdir() `` returns only the base name of each directory entry,
3163+ while ``listdir_recursive() `` returns the initial path and all components
3164+ following it for each entry. Set ``include_prefix `` to false if you don't
3165+ want the ``path `` string prepended to the returned filenames.
31673166
31683167Console API
31693168-----------
@@ -3703,6 +3702,8 @@ functions. These are invoked just like standard string functions, e.g.::
37033702script-manager
37043703==============
37053704
3705+ .. highlight :: none
3706+
37063707This module contains functions useful for mods that contain DFHack scripts to
37073708retrieve source and state paths. The value to pass as ``mod_id `` must be the
37083709same as the mod ID in the mod's :file: `info.txt ` metadata file. The returned
@@ -3741,6 +3742,8 @@ paths will be relative to the top level game directory and will end in a slash
37413742utils
37423743=====
37433744
3745+ .. highlight :: lua
3746+
37443747* ``utils.compare(a,b) ``
37453748
37463749 Comparator function; returns *-1 * if a<b, *1 * if a>b, *0 * otherwise.
0 commit comments