summaryrefslogtreecommitdiff
path: root/include/fstree.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fstree.h')
-rw-r--r--include/fstree.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/fstree.h b/include/fstree.h
index 5b853f3..7ee105b 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -339,4 +339,21 @@ uint64_t find_equal_blocks(file_info_t *file, file_info_t *list,
void optimize_unpack_order(fstree_t *fs, size_t num_jobs,
file_info_t *out[num_jobs]);
+
+/*
+ Convert back to forward slashed, remove all preceeding and trailing slashes,
+ collapse all sequences of slashes, remove all path components that are '.'
+ and returns failure state if one of the path components is '..'.
+
+ Returns 0 on success.
+*/
+int canonicalize_name(char *filename);
+
+/*
+ If the environment variable SOURCE_DATE_EPOCH is set to a parsable number
+ that fits into an unsigned 32 bit value, return its value. Otherwise,
+ default to 0.
+ */
+uint32_t get_source_date_epoch(void);
+
#endif /* FSTREE_H */