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

Function id_to_path

crates/chat-cli/src/cli/chat/tools/todo.rs:124–130  ·  view source on GitHub ↗

Converts a todo list id to an absolute path in the cwd

(os: &Os, id: &str)

Source from the content-addressed store, hash-verified

122
123/// Converts a todo list id to an absolute path in the cwd
124pub fn id_to_path(os: &Os, id: &str) -> Result<PathBuf> {
125 Ok(os
126 .env
127 .current_dir()?
128 .join(get_todo_list_dir(os)?)
129 .join(format!("{id}.json")))
130}
131
132/// Gets all todo lists from the local directory
133pub async fn get_all_todos(os: &Os) -> Result<(Vec<TodoListState>, Vec<Report>)> {

Callers 5

loadMethod · 0.85
saveMethod · 0.85
delete_todoFunction · 0.85
invokeMethod · 0.85
validateMethod · 0.85

Calls 3

get_todo_list_dirFunction · 0.85
joinMethod · 0.80
current_dirMethod · 0.80

Tested by

no test coverage detected