MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / save_content

Method save_content

crates/chat-cli/src/cli/chat/cli/prompts.rs:112–118  ·  view source on GitHub ↗

Save content to the prompt file

(&self, content: &str)

Source from the content-addressed store, hash-verified

110
111 /// Save content to the prompt file
112 fn save_content(&self, content: &str) -> Result<(), GetPromptError> {
113 // Ensure parent directory exists
114 if let Some(parent) = self.path.parent() {
115 fs::create_dir_all(parent).map_err(GetPromptError::Io)?;
116 }
117 fs::write(&self.path, content).map_err(GetPromptError::Io)
118 }
119
120 /// Delete the prompt file
121 fn delete(&self) -> Result<(), GetPromptError> {

Callers 1

execute_createMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected