MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / create_php_file

Method create_php_file

tests/unit/composer.rs:27–33  ·  view source on GitHub ↗

Create a PHP file at the given relative path with minimal content.

(&self, relative_path: &str, content: &str)

Source from the content-addressed store, hash-verified

25
26 /// Create a PHP file at the given relative path with minimal content.
27 fn create_php_file(&self, relative_path: &str, content: &str) {
28 let full_path = self.dir.path().join(relative_path);
29 if let Some(parent) = full_path.parent() {
30 fs::create_dir_all(parent).expect("failed to create dirs");
31 }
32 fs::write(&full_path, content).expect("failed to write PHP file");
33 }
34}
35
36#[test]

Calls

no outgoing calls