diff --git a/src/storage/mod.rs b/src/storage/mod.rs index 3e6a08ff..3e33c681 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -294,29 +294,6 @@ impl Store { self.load(m, parser, &id) } - /** - * Remove a file from the filesystem by FileID - * - * Returns true if this works. - */ - pub fn remove(&self, id: FileID) -> bool { - use std::fs::remove_file; - - self.cache - .borrow_mut() - .remove(&id) - .map(|file| { - let idstr : String = id.into(); - let path = format!("{}/{}-{}.imag", - self.storepath, - file.deref().borrow().owner_name(), - idstr); - debug!("Removing file NOW: '{}'", path); - remove_file(path).is_ok() - }) - .unwrap_or(false) - } - /** * Load all files for a module */ @@ -346,6 +323,29 @@ impl Store { res } + /** + * Remove a file from the filesystem by FileID + * + * Returns true if this works. + */ + pub fn remove(&self, id: FileID) -> bool { + use std::fs::remove_file; + + self.cache + .borrow_mut() + .remove(&id) + .map(|file| { + let idstr : String = id.into(); + let path = format!("{}/{}-{}.imag", + self.storepath, + file.deref().borrow().owner_name(), + idstr); + debug!("Removing file NOW: '{}'", path); + remove_file(path).is_ok() + }) + .unwrap_or(false) + } + /** * Helper to generate a new FileID object */