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

Function copy_extension_sql_dir

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

Source from the content-addressed store, hash-verified

8673}
8674
8675fn copy_extension_sql_dir(source: &Path, destination: &Path) -> Result<bool> {
8676 if !source.is_dir() {
8677 return Ok(false);
8678 }
8679 let mut copied = false;
8680 for entry in sorted_files(source)? {
8681 if entry.extension().and_then(|ext| ext.to_str()) != Some("sql") {
8682 continue;
8683 }
8684 let file_name = entry
8685 .file_name()
8686 .ok_or_else(|| anyhow!("SQL file has no name: {}", entry.display()))?;
8687 copy_file(&entry, &destination.join(file_name))?;
8688 copied = true;
8689 }
8690 Ok(copied)
8691}
8692
8693fn stage_contrib_extension(
8694 source: &Path,

Callers 1

Calls 4

sorted_filesFunction · 0.85
copy_fileFunction · 0.85
extensionMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected