Read the entire auth store from disk.
()
| 58 | |
| 59 | /// Read the entire auth store from disk. |
| 60 | async fn read_all() -> HashMap<String, AuthEntry> { |
| 61 | let path = auth_file_path(); |
| 62 | match fs::read_to_string(&path).await { |
| 63 | Ok(contents) => serde_json::from_str(&contents).unwrap_or_default(), |
| 64 | Err(_) => HashMap::new(), |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | /// Write the entire auth store to disk (creates parent dirs as needed). |
| 69 | async fn write_all(data: &HashMap<String, AuthEntry>) -> Result<(), std::io::Error> { |
no test coverage detected