Deletes the program given by `raw_location`.
(&mut self, raw_location: &str)
| 578 | |
| 579 | /// Deletes the program given by `raw_location`. |
| 580 | pub async fn delete(&mut self, raw_location: &str) -> io::Result<()> { |
| 581 | let location = Location::new(raw_location)?; |
| 582 | match location.leaf_name() { |
| 583 | Some(name) => self.get_drive_mut(&location)?.delete(name).await, |
| 584 | None => Err(io::Error::new( |
| 585 | io::ErrorKind::NotFound, |
| 586 | format!("Missing file name in path '{}'", raw_location), |
| 587 | )), |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | /// Returns a sorted list of the entries in `raw_location` and their metadata. |
| 592 | pub async fn enumerate(&self, raw_location: &str) -> io::Result<DriveFiles> { |