2e51be12 arthurmelton2fb4d353 arthurmeltond6b497e2 Arthur Melton2e51be12 arthurmelton2fb4d353 arthurmelton2e51be12 arthurmelton2fb4d353 arthurmelton2e51be12 arthurmelton5b96ebd5 arthurmelton2e51be12 arthurmelton5b96ebd5 arthurmelton2e51be12 arthurmelton5b96ebd5 arthurmelton0f8635bc arthurmeltond9fbf244 Arthur Meltond6b497e2 Arthur Meltond9fbf244 Arthur Melton4ea5743d arthurmelton2fb4d353 arthurmeltond6b497e2 Arthur Meltond9fbf244 Arthur Melton2fb4d353 arthurmelton0f8635bc arthurmelton188f6383 Arthur Melton9226e0e3 Arthur Melton188f6383 Arthur Melton2e51be12 arthurmelton0f8635bc arthurmelton2fb4d353 arthurmelton2e51be12 arthurmelton2fb4d353 arthurmelton2e51be12 arthurmelton2fb4d353 arthurmelton2e51be12 arthurmelton9226e0e3 Arthur Melton2e51be12 arthurmelton2fb4d353 arthurmelton5b96ebd5 arthurmelton2e51be12 arthurmelton073f1644 Arthur Melton2e51be12 arthurmelton073f1644 Arthur Melton2e51be12 arthurmelton073f1644 Arthur Melton2e51be12 arthurmelton073f1644 Arthur Melton2e51be12 arthurmelton073f1644 Arthur Melton2e51be12 arthurmelton073f1644 Arthur Melton2e51be12 arthurmeltond6b497e2 Arthur Melton77beca8c Arthur Meltond6b497e2 Arthur Meltond9fbf244 Arthur Meltond6b497e2 Arthur Melton8bbbbea3 Arthur Meltond6b497e2 Arthur Meltond9fbf244 Arthur Meltonc0811f75 Arthur Meltond6b497e2 Arthur Melton8bbbbea3 Arthur Meltond6b497e2 Arthur Meltond9fbf244 Arthur Meltond6b497e2 Arthur Meltond9fbf244 Arthur Meltond6b497e2 Arthur Meltond9fbf244 Arthur Melton0fd9e0c1 Arthur Melton2e51be12 arthurmelton5b96ebd5 arthurmelton2fb4d353 arthurmeltoncd00e4d6 Arthur Melton2fb4d353 arthurmelton4ea5743d arthurmelton
1 2 3 4 5 6 7 8 9 10 11 12 13 14
use walkdir::WalkDir;
use std::fs;
use std::path::Path;
fn main() {
let _ = fs::create_dir("public");
for e in WalkDir::new("static").into_iter().filter_map(|e| e.ok()) {
if e.metadata().unwrap().is_file() {
let mut path = e.path();
path = path.strip_prefix("static/").unwrap(); // should never fail
fs::copy(e.path(), Path::new("public").join(path)).expect(&format!("failed to copy static/{} to public/{}", path.display(), path.display()));
}
}
}