summaryrefslogtreecommitdiff
path: root/file.h
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2024-09-11 11:20:31 +0200
committerVincent Douillet <vincent@vdouillet.fr>2024-09-11 11:20:31 +0200
commit19e47daa9c1fb55f2cb9e639d5a6ef16b5bc4e88 (patch)
tree2b98ac0700a11cb142625d8355019c44b49c1850 /file.h
parent4e921ffa31fdca2425d326efda1c6d9ad190359a (diff)
url: fix encoding for use in http context
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 */