summaryrefslogtreecommitdiffstats
path: root/dirs.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:12:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:12:14 +0000
commit4b8a0f3f3dcf60dac2ce308ea08d413a535af29f (patch)
tree0f09c0ad2a4d0f535d89040a63dc3a866a6606e6 /dirs.h
parentInitial commit. (diff)
downloadreprepro-upstream/5.4.4.tar.xz
reprepro-upstream/5.4.4.zip
Adding upstream version 5.4.4.upstream/5.4.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--dirs.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/dirs.h b/dirs.h
new file mode 100644
index 0000000..112f376
--- /dev/null
+++ b/dirs.h
@@ -0,0 +1,29 @@
+#ifndef REPREPRO_DIRS_H
+#define REPREPRO_DIRS_H
+
+#ifndef REPREPRO_ERROR_H
+#warning "What is happening here?"
+#include "error.h"
+#endif
+#ifndef REPREPRO_STRLIST_H
+#warning "What is happening here?"
+#include "strlist.h"
+#endif
+
+/* create a directory, return RET_NOTHING if already existing */
+retvalue dirs_create(const char *);
+/* create recursively all parent directories before the last '/' */
+retvalue dirs_make_parent(const char *);
+/* create dirname and any '/'-separated part of it */
+retvalue dirs_make_recursive(const char *);
+/* create directory and parents as needed, and save count to remove them later */
+retvalue dir_create_needed(const char *, int *);
+void dir_remove_new(const char *, int);
+
+/* Behave like dirname(3) */
+retvalue dirs_getdirectory(const char *, /*@out@*/char **);
+
+const char *dirs_basename(const char *);
+
+bool isdir(const char *);
+#endif