MCPcopy Index your code
hub / github.com/endbasic/endbasic / delete

Method delete

std/src/storage/mod.rs:580–589  ·  view source on GitHub ↗

Deletes the program given by `raw_location`.

(&mut self, raw_location: &str)

Source from the content-addressed store, hash-verified

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> {

Calls 2

leaf_nameMethod · 0.80
get_drive_mutMethod · 0.80