aboutsummaryrefslogtreecommitdiff
path: root/include/copy.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2023-11-20 00:31:20 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2023-11-20 00:31:20 -0500
commit0340f7765a6aa78de6e6a3ea8c3878713201e94e (patch)
tree52a8fdb50706f8387013f67faad87c76c3974198 /include/copy.h
parent62edbefaffeb2f9d3a52193c2e0d54c77acbcc40 (diff)
downloadstasis-0340f7765a6aa78de6e6a3ea8c3878713201e94e.tar.gz
Add copy.c, copy.h
* copytree() * mkdirs() * copy2()
Diffstat (limited to 'include/copy.h')
-rw-r--r--include/copy.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/copy.h b/include/copy.h
new file mode 100644
index 0000000..9e8bc11
--- /dev/null
+++ b/include/copy.h
@@ -0,0 +1,19 @@
+#ifndef OMC_COPY_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <dirent.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include "omc.h"
+
+#define CT_OWNER 1 << 1
+#define CT_PERM 1 << 2
+
+int copytree(const char *srcdir, const char *destdir, unsigned op);
+int mkdirs(const char *_path, mode_t mode);
+int copy2(const char *src, const char *dest, unsigned op);
+
+#endif // OMC_COPY_H \ No newline at end of file