summaryrefslogtreecommitdiff
path: root/libcore/helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcore/helpers.c')
-rw-r--r--libcore/helpers.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcore/helpers.c b/libcore/helpers.c
index 1934f3e..4ca2272 100644
--- a/libcore/helpers.c
+++ b/libcore/helpers.c
@@ -90,6 +90,11 @@ bool isNumber(const string& s) {
return !s.empty() && it == s.end();
}
+bool FileExists(const string &fullpath) {
+ struct stat buffer;
+ return (stat (fullpath.c_str(), &buffer) == 0);
+}
+
bool FileExists(const string &path, const string &name, const string &ext) {
stringstream fileName;
fileName << path << name << "." << ext;