aboutsummaryrefslogtreecommitdiff
path: root/src/filesys.h
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2022-05-07 16:44:46 +0100
committerrubenwardy <rw@rubenwardy.com>2022-07-14 22:12:54 +0100
commit06de82fd86678e0a1c260c67792c5cd192863edd (patch)
tree82f7fb040860fd3d099ddce43be2710b120da083 /src/filesys.h
parent1d512ef7f4071fadf10078825ce83e77a3707f06 (diff)
downloadminetest-06de82fd86678e0a1c260c67792c5cd192863edd.tar.gz
minetest-06de82fd86678e0a1c260c67792c5cd192863edd.tar.bz2
minetest-06de82fd86678e0a1c260c67792c5cd192863edd.zip
Refactor ModConfiguration
Diffstat (limited to 'src/filesys.h')
-rw-r--r--src/filesys.h5
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.