summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index 2460ab9..23004f0 100644
--- a/src/util.h
+++ b/src/util.h
@@ -10,8 +10,19 @@ void rotdash(void);
const char* get_attached_filename(const char *path, const char *fn);
int isdirectory(const char *path);
int copy_fd(int sfd, int dfd, uint32_t l);
-int copy_file(const char *src, const char *dst);
-int copy_or_link_file(const char *src, const char *dst);
+int copy_file(const char *src, const char *dst, int c);
+int copy_or_link_file(const char *src, const char *dst, int c);
+
+/* Remove all directories between path and root if they are empty. */
+int prune_empty_directories(const char *path, const char *root);
+
+/* Same as /bin/mkdir -p in the shell */
+int mkdir_p(const char *path, mode_t m);
+
+/* Create all leading directories in path */
+int makeprefixpath(const char *path, mode_t m);
+
+int move_file(const char *src, const char *dst, int c);
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))