(&self, path: B, body: impl AsRef<[u8]>)
| 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"); |