use of org.syncany.operations.ls.LsOperation in project syncany by syncany.
the class LsCommand method execute.
@Override
public int execute(String[] operationArgs) throws Exception {
LsOperationOptions operationOptions = parseOptions(operationArgs);
LsOperationResult operationResult = new LsOperation(config, operationOptions).execute();
printResults(operationResult);
return 0;
}
use of org.syncany.operations.ls.LsOperation in project syncany by syncany.
the class LsFolderRequestHandler method handleRequest.
@Override
public Response handleRequest(FolderRequest request) {
LsFolderRequest concreteRequest = (LsFolderRequest) request;
try {
LsOperation operation = new LsOperation(config, concreteRequest.getOptions());
LsOperationResult operationResult = operation.execute();
LsFolderResponse response = new LsFolderResponse(operationResult, request.getId());
return response;
} catch (Exception e) {
logger.log(Level.WARNING, "Cannot obtain status.", e);
return new BadRequestResponse(request.getId(), "Cannot execute operation: " + e.getMessage());
}
}
Aggregations