boolean recursive, boolean fail_on_error) {
DataStore store = runtime.getDataStore();
if (recursive) {
try {
for (String entry : getAllEntries(href.getString(), base)) {
store.deleteEntry(entry, entry);
}
} catch (FileNotFoundException e) {
if (fail_on_error) {
throw new XProcException(step.getNode(), "Cannot delete: file does not exist", e);
}