aboutsummaryrefslogtreecommitdiffstats
path: root/src/ckutil.h
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-04-22 05:47:33 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-04-22 05:47:33 +0300
commiteeca7f0151d85d563d1db229e3b7ca936323ffa2 (patch)
tree32e57172bd786daed9ac4251b3c5edf09c49d242 /src/ckutil.h
parent3560d8be4b833e888e8386a3dc641fa164b4b808 (diff)
downloadck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.tar.gz
ck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.tar.bz2
ck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.zip
First steps towards adding to the db
Diffstat (limited to 'src/ckutil.h')
-rw-r--r--src/ckutil.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ckutil.h b/src/ckutil.h
new file mode 100644
index 0000000..c99798d
--- /dev/null
+++ b/src/ckutil.h
@@ -0,0 +1,29 @@
+/* ckutil.h - utility functions for ck ---------------------------------*- C -*-
+ *
+ * This file is part of ck, the config keeper
+ *
+ * -----------------------------------------------------------------------------
+ *
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
+ *
+ * -------------------------------------------------------------------------- */
+#ifndef CKUTIL_H
+#define CKUTIL_H
+
+/* Returns 1 if path is a directory, else returns 0. */
+extern int util_is_dir(const char *path);
+
+/* Returns 1 if file(or dir) exists, else returns 0. */
+extern int util_file_exists(const char *path);
+
+extern int util_is_file_rw(const char *path);
+extern int util_is_cli_flag();
+
+/* Returns 1 if str contains only whitespace, or nothing,
+ * else returns 0. */
+extern int util_is_str_empty();
+extern int util_remove_newlibe();
+
+extern void util_mkdir(const char *path);
+#endif // CKUTIL_H