mirror of
https://github.com/Noratrieb/website.git
synced 2026-01-14 17:05:02 +01:00
static stuff
This commit is contained in:
parent
56da12a5bc
commit
148a5352a3
8 changed files with 237 additions and 2 deletions
15
src/utils.rs
15
src/utils.rs
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue