MCPcopy Create free account
hub / github.com/cargo-lambda/cargo-lambda / read_file

Method read_file

crates/cargo-lambda-cli/tests/harness/project.rs:76–80  ·  view source on GitHub ↗

Returns the contents of a path in the project root

(&self, path: &str)

Source from the content-addressed store, hash-verified

74
75 /// Returns the contents of a path in the project root
76 pub fn read_file(&self, path: &str) -> String {
77 let full = self.root().join(path);
78 fs::read_to_string(&full)
79 .unwrap_or_else(|e| panic!("could not read file {}: {}", full.display(), e))
80 }
81
82 pub fn lambda_dir(&self) -> PathBuf {
83 self.build_dir().join("lambda")

Callers 1

test_projectFunction · 0.80

Calls 1

rootMethod · 0.45

Tested by

no test coverage detected