diff options
author | rubenwardy <rw@rubenwardy.com> | 2022-05-07 16:44:46 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2022-07-14 22:12:54 +0100 |
commit | 06de82fd86678e0a1c260c67792c5cd192863edd (patch) | |
tree | 82f7fb040860fd3d099ddce43be2710b120da083 /src/filesys.h | |
parent | 1d512ef7f4071fadf10078825ce83e77a3707f06 (diff) | |
download | minetest-06de82fd86678e0a1c260c67792c5cd192863edd.tar.gz minetest-06de82fd86678e0a1c260c67792c5cd192863edd.tar.bz2 minetest-06de82fd86678e0a1c260c67792c5cd192863edd.zip |
Refactor ModConfiguration
Diffstat (limited to 'src/filesys.h')
-rw-r--r-- | src/filesys.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/filesys.h b/src/filesys.h index 3fa2524c3..a26fe28d6 100644 --- a/src/filesys.h +++ b/src/filesys.h @@ -60,6 +60,11 @@ bool IsPathAbsolute(const std::string &path); bool IsDir(const std::string &path); +inline bool IsFile(const std::string &path) +{ + return PathExists(path) && !IsDir(path); +} + bool IsDirDelimiter(char c); // Only pass full paths to this one. True on success. |