Returns files matching the given prefix. When prefix is `None`, returns a clone of the `Arc` (no data copy). When filtering is needed, returns a new `Arc` with filtered results (clones each matching [`ObjectMeta`]).
(&self, prefix: &Option<Path>)
| 174 | /// When prefix is `None`, returns a clone of the `Arc` (no data copy). |
| 175 | /// When filtering is needed, returns a new `Arc` with filtered results (clones each matching [`ObjectMeta`]). |
| 176 | pub fn files_matching_prefix(&self, prefix: &Option<Path>) -> Arc<Vec<ObjectMeta>> { |
| 177 | match prefix { |
| 178 | None => Arc::clone(&self.files), |
| 179 | Some(p) => Arc::new(self.filter_by_prefix(&Some(p.clone()))), |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | impl Deref for CachedFileList { |