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

Method config_path

crates/cargo-lambda-new/src/template.rs:160–168  ·  view source on GitHub ↗

Returns the path to the directory containing the CargoLambda.toml configuration file. If the file exists at the root level, returns the root path. Otherwise returns the template subdirectory path.

(&self)

Source from the content-addressed store, hash-verified

158 /// If the file exists at the root level, returns the root path.
159 /// Otherwise returns the template subdirectory path.
160 pub(crate) fn config_path(&self) -> PathBuf {
161 let path = self.path();
162 let config = path.join("CargoLambda.toml");
163 if config.exists() && config.is_file() {
164 return path.to_path_buf();
165 }
166
167 Self::template_path(path)
168 }
169
170 /// Returns the path to the template subdirectory if it exists.
171 /// Otherwise returns the root path.

Callers 1

new_projectFunction · 0.80

Calls 1

pathMethod · 0.80

Tested by

no test coverage detected