summaryrefslogtreecommitdiff
path: root/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'file.h')
-rw-r--r--file.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/file.h b/file.h
index f6aac76..1ede156 100644
--- a/file.h
+++ b/file.h
@@ -76,4 +76,18 @@ file_get_basename(const struct file *);
size_t
file_get_data_path(const struct file *, char *, size_t, char *);
+/*
+ * Build a path from the provided components.
+ * The first argument is the destination buffer where the path will be written.
+ * It is required.
+ * The second argument is the size of the destination buffer. It is required.
+ * The remaining arguments are the path parts which should end with a NULL
+ * component.
+ * Returns the number of characters written to the destination buffer. If it
+ * is equal to the destination buffer size, it means the buffer was too small
+ * and the resulting path has been truncated.
+ */
+size_t
+path_build(char *, size_t,...);
+
#endif /* FILE_H */