aboutsummaryrefslogtreecommitdiff
path: root/src/file_functions.cpp
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2018-12-26 16:43:08 +0100
committerDavid Skoland <davidskoland@gmail.com>2018-12-26 16:43:08 +0100
commit00cfd2750d39795e4c205aee2a33b92b1da2524d (patch)
tree839c1129418ca8fefe41e6814917f9dabb6efa4b /src/file_functions.cpp
parent6f1bce5882676ea7affe717a2f5a00b8c3b7fe12 (diff)
moved headers into include and cpp files into src + logo into resource
Diffstat (limited to 'src/file_functions.cpp')
-rw-r--r--src/file_functions.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/file_functions.cpp b/src/file_functions.cpp
new file mode 100644
index 00000000..f93ee15d
--- /dev/null
+++ b/src/file_functions.cpp
@@ -0,0 +1,21 @@
+#include "file_functions.h"
+
+bool file_exists(QString file_path)
+{
+ QFileInfo check_file(file_path);
+
+ return check_file.exists() && check_file.isFile();
+}
+
+bool dir_exists(QString dir_path)
+{
+ QDir check_dir(dir_path);
+
+ return check_dir.exists();
+}
+
+bool exists(QString p_path) {
+ QFile file(p_path);
+
+ return file.exists();
+}