Skip to content

Commit 6a9919d

Browse files
authored
Merge pull request #5356 from ab9rf/std-filesystem
use `std::filesystem::path` for filesystem operations
2 parents 487df2c + 4a8b292 commit 6a9919d

23 files changed

+357
-469
lines changed

ci/test.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,13 @@ local MODES = {
289289

290290
local function load_test_config(config_file)
291291
local config = {}
292+
print ("loading test config from " .. config_file)
292293
if dfhack.filesystem.isfile(config_file) then
293294
config = json.decode_file(config_file)
294295
end
295296

296297
if not config.test_dir then
297-
config.test_dir = dfhack.getHackPath() .. 'scripts/test'
298+
config.test_dir = dfhack.getHackPath() .. '/scripts/test'
298299
end
299300

300301
if not config.save_dir then

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Template for new versions:
6262
## Documentation
6363

6464
## API
65+
- ``Filesystem`` module: rewritten to use C++ standard library components, for better portability
6566

6667
## Lua
6768

docs/dev/Lua API.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3168,12 +3168,6 @@ unless otherwise noted.
31683168
specified by ``path``, or -1 if ``path`` does not exist.
31693169
This depends on the system clock and should only be used locally.
31703170

3171-
* ``dfhack.filesystem.atime(path)``
3172-
* ``dfhack.filesystem.ctime(path)``
3173-
3174-
Return values vary across operating systems - return the ``st_atime`` and
3175-
``st_ctime`` fields of a C++ stat struct, respectively.
3176-
31773171
* ``dfhack.filesystem.listdir(path)``
31783172

31793173
Lists files/directories in a directory. Returns ``{}`` if ``path`` does not exist.

0 commit comments

Comments
 (0)