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

Function reset_dir

src/pglite/base.rs:1973–1979  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

1971}
1972
1973fn reset_dir(path: &Path) -> Result<()> {
1974 if path.exists() {
1975 fs::remove_dir_all(path).with_context(|| format!("remove {}", path.display()))?;
1976 }
1977 fs::create_dir_all(path).with_context(|| format!("create {}", path.display()))?;
1978 Ok(())
1979}
1980
1981fn copy_runtime_file_if_exists(src: PathBuf, dest: PathBuf) -> Result<()> {
1982 if !src.exists() {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected