public Result execute(UIExecutionContext context) throws Exception
{
Resource<?> currentResource = (Resource<?>) context.getUIContext().getInitialSelection().get();
for (String file : arguments.getValue())
{
List<Resource<?>> resources = new ResourcePathResolver(resourceFactory, currentResource, file).resolve();
for (Resource<?> resource : resources)
{
if (!resource.exists())
{
return Results.fail(file + ": no such file or directory");
}
}
}
boolean forceOption = force.getValue();
boolean recurse = recursive.getValue();
UIPrompt prompt = context.getPrompt();
UIOutput output = context.getUIContext().getProvider().getOutput();
for (String file : arguments.getValue())
{
List<Resource<?>> resources = new ResourcePathResolver(resourceFactory, currentResource, file).resolve();
for (Resource<?> resource : resources)
{
if ((resource instanceof DirectoryResource))
{
if (!recurse)