MCPcopy Create free account
hub / github.com/archlinux/alpm / create_data_files

Function create_data_files

alpm-common/src/package/input.rs:345–354  ·  view source on GitHub ↗
(path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

343"#;
344
345 fn create_data_files(path: impl AsRef<Path>) -> TestResult {
346 let path = path.as_ref();
347 // Create dummy directory structure
348 create_dir_all(path.join("usr/share/foo/bar/baz"))?;
349 // Create dummy text file
350 File::create(path.join("usr/share/foo/beh.txt"))?.write_all(b"test")?;
351 // Create relative symlink to actual text file
352 symlink("../../beh.txt", path.join("usr/share/foo/bar/baz/beh.txt"))?;
353 Ok(())
354 }
355
356 fn create_metadata_files(path: impl AsRef<Path>) -> TestResult {
357 let path = path.as_ref();

Calls 4

write_allMethod · 0.80
createFunction · 0.50
as_refMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected