]> git.r.bdr.sh - rbdr/blog/blobdiff - src/archiver/raw.rs
Generate and archive blog, allow publishing
[rbdr/blog] / src / archiver / raw.rs
diff --git a/src/archiver/raw.rs b/src/archiver/raw.rs
new file mode 100644 (file)
index 0000000..5099f2b
--- /dev/null
@@ -0,0 +1,11 @@
+use std::io::Result;
+use std::path::PathBuf;
+use crate::template::TemplateContext;
+use crate::utils::recursively_copy;
+
+pub fn archive(archive_directory: &PathBuf, _: &PathBuf, target: &PathBuf, _: &TemplateContext) -> Result<()> {
+    if archive_directory.exists() {
+        return recursively_copy(archive_directory, target);
+    }
+    Ok(())
+}