return CommandResult.SUCCESS;
}
private void rmFile(Resource r, CommandInvocation commandInvocation) throws InterruptedException {
Shell shell = commandInvocation.getShell();
if (r.exists()) {
if (r.isLeaf()) {
if (interactive) {
shell.out().println("remove regular file '" + r.getName() + "' ? (y/n)");
CommandOperation operation = commandInvocation.getInput();
if (operation.getInputKey() == Key.y) {
r.delete();
}
} else {
r.delete();
}
if (verbose) {
shell.out().println("removed '" + r.getName() + "'");
}
} else if (r.isDirectory()) {
shell.out().println("cannot remove '" + r.getName() + "': Is a directory");
}
}
}