Add option to delete sources with support in all three backends

This commit is contained in:
2010-11-19 22:24:12 +00:00
parent 73e42a42b1
commit fa7b54b861
10 changed files with 128 additions and 2 deletions

View File

@@ -67,6 +67,22 @@ class RippingCluster_Source_PluginFactory extends RippingCluster_PluginFactory {
return call_user_func(array(self::classname($plugin), 'isValidSource'), source_filename);
}
/**
* Permanently deletes the given source from disk
*
* @param string $plugin Name of the plugin used to load the source
* @param string $source_filename Filename of the source to be deleted
*/
public static function delete($plugin, $source_filename) {
self::ensureScanned();
if ( ! self::isValidPlugin($plugin)) {
return null;
}
return call_user_func(array(self::classname($plugin), 'delete'), $source_filename);
}
}
?>