address PR review comments on api docs

develop
Myk Taylor 2020-07-23 21:55:05 -07:00
parent 6a851537d5
commit e17d492203
2 changed files with 4 additions and 1 deletions

@ -51,7 +51,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `confirm`: added a confirmation dialog for convicting dwarves of crimes
## API
- Added ``Filesystem::mkdir_recursive`` (returns true if directories to create already exist)
- Added ``Filesystem::mkdir_recursive``
- Extended ``Filesystem::listdir_recursive`` to optionally make returned filenames relative to the start directory
## Lua

@ -149,6 +149,7 @@ namespace DFHack {
DFHACK_EXPORT bool chdir (std::string path);
DFHACK_EXPORT std::string getcwd ();
DFHACK_EXPORT bool mkdir (std::string path);
// returns true on success or if directory already exists
DFHACK_EXPORT bool mkdir_recursive (std::string path);
DFHACK_EXPORT bool rmdir (std::string path);
DFHACK_EXPORT bool stat (std::string path, STAT_STRUCT &info);
@ -160,6 +161,8 @@ namespace DFHack {
DFHACK_EXPORT int64_t ctime (std::string path);
DFHACK_EXPORT int64_t mtime (std::string path);
DFHACK_EXPORT int listdir (std::string dir, std::vector<std::string> &files);
// set include_prefix to false to prevent dir from being prepended to
// paths returned in files
DFHACK_EXPORT int listdir_recursive (std::string dir, std::map<std::string, bool> &files,
int depth = 10, bool include_prefix = true);
}