List all versions of a specific file
(&self, path: &str)
| 105 | |
| 106 | /// List all versions of a specific file |
| 107 | pub fn list_versions(&self, path: &str) -> Vec<VersionSummary> { |
| 108 | let snapshots = read_or_recover(&self.snapshots); |
| 109 | snapshots |
| 110 | .get(path) |
| 111 | .map(|versions| versions.iter().map(VersionSummary::from).collect()) |
| 112 | .unwrap_or_default() |
| 113 | } |
| 114 | |
| 115 | /// Evict oldest snapshots when over the limit |
| 116 | fn evict_if_needed(&self, snapshots: &mut HashMap<String, Vec<FileSnapshot>>) { |