/** Gets a named expression from the factory. */ private Expression getExpression(String expressionName) { return ExpressionFactory.getExpressionFactory().getExpression( expressionName, getConf()); }
/** Gets an instance of an expression from the factory. */ private Expression getExpression( Class<? extends Expression> expressionClass) { return ExpressionFactory.getExpressionFactory().createExpression( expressionClass, getConf()); }
@Override protected boolean isPathRecursable(PathData item) throws IOException { if (item.stat.isDirectory()) { return true; } if (item.stat.isSymlink()) { PathData linkedItem = new PathData(item.fs.resolvePath(item.stat.getSymlink()).toString(), getConf()); if (linkedItem.stat.isDirectory()) { if (getOptions().isFollowLink()) { return true; } if (getOptions().isFollowArgLink() && (getDepth() == 0)) { return true; } } } return false; }
/** Create a new set of find options. */ private FindOptions createOptions() { FindOptions options = new FindOptions(); options.setOut(out); options.setErr(err); options.setIn(System.in); options.setCommandFactory(getCommandFactory()); options.setConfiguration(getConf()); return options; }
@Override protected void recursePath(PathData item) throws IOException { if (isStop(item)) { // this item returned a stop result so don't recurse any further return; } if (getDepth() >= getOptions().getMaxDepth()) { // reached the maximum depth so don't got any further. return; } if (item.stat.isSymlink() && getOptions().isFollowLink()) { PathData linkedItem = new PathData(item.stat.getSymlink().toString(), getConf()); if (isAncestor(item, linkedItem)) { getOptions().getErr().println( "Infinite loop ignored: " + item.toString() + " -> " + linkedItem.toString()); return; } if (linkedItem.exists) { item = linkedItem; } } if (item.stat.isDirectory()) { super.recursePath(item); } }
/** Gets an instance of an expression from the factory. */ private Expression getExpression( Class<? extends Expression> expressionClass) { return ExpressionFactory.getExpressionFactory().createExpression( expressionClass, getConf()); }
/** Gets a named expression from the factory. */ private Expression getExpression(String expressionName) { return ExpressionFactory.getExpressionFactory().getExpression( expressionName, getConf()); }
/** Gets a named expression from the factory. */ private Expression getExpression(String expressionName) { return ExpressionFactory.getExpressionFactory().getExpression( expressionName, getConf()); }
/** Gets a named expression from the factory. */ private Expression getExpression(String expressionName) { return ExpressionFactory.getExpressionFactory().getExpression( expressionName, getConf()); }
/** Gets an instance of an expression from the factory. */ private Expression getExpression( Class<? extends Expression> expressionClass) { return ExpressionFactory.getExpressionFactory().createExpression( expressionClass, getConf()); }
/** Gets an instance of an expression from the factory. */ private Expression getExpression( Class<? extends Expression> expressionClass) { return ExpressionFactory.getExpressionFactory().createExpression( expressionClass, getConf()); }
/** Gets a named expression from the factory. */ private Expression getExpression(String expressionName) { return ExpressionFactory.getExpressionFactory().getExpression( expressionName, getConf()); }
/** Gets an instance of an expression from the factory. */ private Expression getExpression( Class<? extends Expression> expressionClass) { return ExpressionFactory.getExpressionFactory().createExpression( expressionClass, getConf()); }
@Override protected boolean isPathRecursable(PathData item) throws IOException { if (item.stat.isDirectory()) { return true; } if (item.stat.isSymlink()) { PathData linkedItem = new PathData(item.fs.resolvePath(item.stat.getSymlink()).toString(), getConf()); if (linkedItem.stat.isDirectory()) { if (getOptions().isFollowLink()) { return true; } if (getOptions().isFollowArgLink() && (getDepth() == 0)) { return true; } } } return false; }
@Override protected boolean isPathRecursable(PathData item) throws IOException { if (item.stat.isDirectory()) { return true; } if (item.stat.isSymlink()) { PathData linkedItem = new PathData(item.fs.resolvePath(item.stat.getSymlink()).toString(), getConf()); if (linkedItem.stat.isDirectory()) { if (getOptions().isFollowLink()) { return true; } if (getOptions().isFollowArgLink() && (getDepth() == 0)) { return true; } } } return false; }
@Override protected boolean isPathRecursable(PathData item) throws IOException { if (item.stat.isDirectory()) { return true; } if (item.stat.isSymlink()) { PathData linkedItem = new PathData(item.fs.resolvePath(item.stat.getSymlink()).toString(), getConf()); if (linkedItem.stat.isDirectory()) { if (getOptions().isFollowLink()) { return true; } if (getOptions().isFollowArgLink() && (getDepth() == 0)) { return true; } } } return false; }
/** Create a new set of find options. */ private FindOptions createOptions() { FindOptions options = new FindOptions(); options.setOut(out); options.setErr(err); options.setIn(System.in); options.setCommandFactory(getCommandFactory()); options.setConfiguration(getConf()); return options; }
/** Create a new set of find options. */ private FindOptions createOptions() { FindOptions options = new FindOptions(); options.setOut(out); options.setErr(err); options.setIn(System.in); options.setCommandFactory(getCommandFactory()); options.setConfiguration(getConf()); return options; }
/** Create a new set of find options. */ private FindOptions createOptions() { FindOptions options = new FindOptions(); options.setOut(out); options.setErr(err); options.setIn(System.in); options.setCommandFactory(getCommandFactory()); options.setConfiguration(getConf()); return options; }
/** Create a new set of find options. */ private FindOptions createOptions() { FindOptions options = new FindOptions(); options.setOut(out); options.setErr(err); options.setIn(System.in); options.setCommandFactory(getCommandFactory()); options.setConfiguration(getConf()); return options; }