use crate::system::LocalPath;
use crate::Operation::DeleteFiles;
use crate::Reason::UnknownFileSystem;
use crate::{Error, FolderPath};
impl FolderPath {
pub fn delete_files(&self) -> Result<(), Error> {
if let Some(path) = LocalPath::new(self.path()) {
return path.delete_files();
}
#[cfg(feature = "r2")]
if let Some(path) = crate::R2Path::new(self.path()) {
return path.delete_files();
}
Err(Error::new(self.clone(), DeleteFiles, UnknownFileSystem))
}
}