MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / copy_file

Function copy_file

xtask/src/main.rs:9444–9452  ·  view source on GitHub ↗
(source: &Path, destination: &Path)

Source from the content-addressed store, hash-verified

9442}
9443
9444fn copy_file(source: &Path, destination: &Path) -> Result<()> {
9445 ensure_file(source)?;
9446 if let Some(parent) = destination.parent() {
9447 fs::create_dir_all(parent).with_context(|| format!("create {}", parent.display()))?;
9448 }
9449 fs::copy(source, destination)
9450 .with_context(|| format!("copy {} -> {}", source.display(), destination.display()))?;
9451 Ok(())
9452}
9453
9454fn copy_dir_all(source: &Path, destination: &Path) -> Result<()> {
9455 if destination.exists() {

Callers 12

stage_release_workspaceFunction · 0.85
from_packaged_assetsMethod · 0.85
copy_extension_sql_filesFunction · 0.85
copy_extension_sql_dirFunction · 0.85
stage_contrib_extensionFunction · 0.85
stage_runtime_treeFunction · 0.85
package_aot_artifactsFunction · 0.85
copy_tree_filteredFunction · 0.85
copy_dir_allFunction · 0.85

Calls 1

ensure_fileFunction · 0.85

Tested by

no test coverage detected