static stuff

This commit is contained in:
nora 2024-01-18 21:22:08 +01:00
parent 56da12a5bc
commit 148a5352a3
8 changed files with 237 additions and 2 deletions

View file

@ -53,3 +53,18 @@ pub fn cp_r(from: &Path, to: &Path) -> Result<()> {
.wrap_err(format!("copying to {}", to.display()))?;
Ok(())
}
pub fn cp_content(from: &Path, to: &Path) -> Result<()> {
fs_extra::dir::copy(
from,
to,
&CopyOptions {
overwrite: true,
copy_inside: true,
content_only: true,
..CopyOptions::default()
},
)
.wrap_err(format!("copying to {}", to.display()))?;
Ok(())
}