MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / copy_library_init_file

Method copy_library_init_file

src/deopt.rs:337–353  ·  view source on GitHub ↗
(&self, dir: &Path)

Source from the content-addressed store, hash-verified

335 }
336
337 pub fn copy_library_init_file(&self, dir: &Path) -> Result<()> {
338 if let Some(init_file) = &self.config.init_file {
339 let file_path: PathBuf = [
340 self.get_library_build_dir()?,
341 "work".into(),
342 init_file.into(),
343 ]
344 .iter()
345 .collect();
346 if !file_path.exists() {
347 eyre::bail!("Cannot find the library initialize file {init_file:?}")
348 }
349 let cur_file: PathBuf = [PathBuf::from(dir), init_file.into()].iter().collect();
350 std::fs::copy(file_path, cur_file)?;
351 }
352 Ok(())
353 }
354
355 pub fn add_extra_c_flags(&self, cmd: &mut Command) -> Result<()> {
356 if let Some(flags) = &self.config.extra_c_flags {

Callers 5

compileMethod · 0.80
compile_fuzzerFunction · 0.80
spawn_libfuzzerMethod · 0.80
compile_seedMethod · 0.80

Calls 1

get_library_build_dirMethod · 0.80

Tested by

no test coverage detected