public Result execute() {
LOGGER.log(Level.FINER, "Executing query: {0}", this);
final DestroyableResource rootFolder = info.getUrl().toLowerCase().startsWith("ftp://") || info.getUrl().toLowerCase().startsWith("ftps://")?
new FtpRootFolder(context, info, criteria):
new WafFolderQuick(context, info, proxy, new HashSet<String>(), info.getUrl(), criteria);
Result r = new CommonResult(new LimitedLengthResourcesAdapter(rootFolder,criteria.getMaxRecords())) {
@Override
public void destroy() {
rootFolder.destroy();
info.destroy();
}