result.write(tree.getResult());
}
private void performDelete(RuntimeValue href, String base,
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);
}
} catch (IOException e) {
if (fail_on_error) {
throw new XProcException(step.getNode(), e);
}
}
}
try {
store.deleteEntry(href.getString(), base);
} catch (FileNotFoundException e) {
if (fail_on_error) {
throw new XProcException(step.getNode(), "Cannot delete: file does not exist", e);
}
} catch (IOException e) {