aboutsummaryrefslogtreecommitdiff
path: root/include/fs.h
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-11-09 20:47:16 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-11-09 20:47:16 +0300
commite2a71b0366aa80a7cf131fdbde6012671493d364 (patch)
treea5a60dbb56043af72c600bff992b863b4f821ede /include/fs.h
parentabbee959bf5c87a8b2ad0b2d55d9ddb955147892 (diff)
downloadrevela-e2a71b0366aa80a7cf131fdbde6012671493d364.tar.gz
revela-e2a71b0366aa80a7cf131fdbde6012671493d364.zip
Copy/sync static files
Diffstat (limited to 'include/fs.h')
-rw-r--r--include/fs.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/fs.h b/include/fs.h
index 015214a..973d585 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -37,7 +37,18 @@ const char *delext(const char *restrict basename, char *restrict dest, size_t n)
*/
int file_is_uptodate(const char *path, const struct timespec *srcmtim);
-/* Sets access and modification times to the time passed */
+/*
+ * Sets access and modification times to the time passed.
+ */
void setdatetime(const char *path, const struct timespec *mtim);
+/*
+ * Copies file(s) truncating and overwritting the file(s) in the destination
+ * path if they exist and are not a directory, or creating them if they don't
+ * exist. If srcpath is a directory, copies all files within that directory
+ * recursively. Only copies the regular files that already exist if their
+ * timestamps do not match.
+ */
+bool filesync(const char *restrict srcpath, const char *restrict dstpath);
+
#endif