You've already forked AstralRinth
forked from didirus/AstralRinth
Profile imports (#348)
* temporary switch * draft; working unmanaged + modrinth * working update * added checkerg * fixed io merge issue * Added api handling * tidying up * reverted playground changes * fixed js issue * fixed merge issues
This commit is contained in:
@@ -135,6 +135,21 @@ pub async fn rename(
|
||||
})
|
||||
}
|
||||
|
||||
// copy
|
||||
pub async fn copy(
|
||||
from: impl AsRef<std::path::Path>,
|
||||
to: impl AsRef<std::path::Path>,
|
||||
) -> Result<u64, IOError> {
|
||||
let from = from.as_ref();
|
||||
let to = to.as_ref();
|
||||
tokio::fs::copy(from, to)
|
||||
.await
|
||||
.map_err(|e| IOError::IOPathError {
|
||||
source: e,
|
||||
path: from.to_string_lossy().to_string(),
|
||||
})
|
||||
}
|
||||
|
||||
// remove file
|
||||
pub async fn remove_file(
|
||||
path: impl AsRef<std::path::Path>,
|
||||
|
||||
Reference in New Issue
Block a user