MCPcopy Create free account
hub / github.com/bytecodealliance/cargo-component / file

Method file

tests/support/mod.rs:325–330  ·  view source on GitHub ↗
(&self, path: B, body: impl AsRef<[u8]>)

Source from the content-addressed store, hash-verified

323 }
324
325 pub fn file<B: AsRef<Path>>(&self, path: B, body: impl AsRef<[u8]>) -> Result<&Self> {
326 let path = self.root().join(path);
327 fs::create_dir_all(path.parent().unwrap())?;
328 fs::write(&path, body)?;
329 Ok(self)
330 }
331
332 pub fn read_manifest(&self) -> Result<DocumentMut> {
333 let manifest_path = self.root.join("Cargo.toml");

Callers 10

generate_bindingsFunction · 0.45
update_lockfileFunction · 0.45
it_checks_a_workspaceFunction · 0.45
it_builds_a_workspaceFunction · 0.45
it_builds_with_adapterFunction · 0.45
it_supports_edition_2021Function · 0.45
it_checks_a_workspaceFunction · 0.45

Calls 1

rootMethod · 0.80