Package com.aoindustries.io
Class FileExistsRule
- java.lang.Object
-
- com.aoindustries.io.FileExistsRule
-
- All Implemented Interfaces:
FilesystemIteratorRule
public class FileExistsRule extends Object implements FilesystemIteratorRule
Conditionally uses one of two rules based on the existence of a file on the current server. TheexistsRuleis used if ANY one of thefullPathsexists. ThenotExistsRuleis used if NONE of thefullPathsexist.- Author:
- AO Industries, Inc.
-
-
Field Summary
-
Fields inherited from interface com.aoindustries.io.FilesystemIteratorRule
OK, SKIP
-
-
Constructor Summary
Constructors Constructor Description FileExistsRule(String[] fullPaths, FilesystemIteratorRule existsRule, FilesystemIteratorRule notExistsRule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilesystemIteratorRulegetEffectiveRule(String filename)booleanisIncluded(String filename)Gets if this item should be included.
-
-
-
Constructor Detail
-
FileExistsRule
public FileExistsRule(String[] fullPaths, FilesystemIteratorRule existsRule, FilesystemIteratorRule notExistsRule)
-
-
Method Detail
-
getEffectiveRule
public FilesystemIteratorRule getEffectiveRule(String filename) throws IOException
- Throws:
IOException
-
isIncluded
public boolean isIncluded(String filename) throws IOException
Description copied from interface:FilesystemIteratorRuleGets if this item should be included.- Specified by:
isIncludedin interfaceFilesystemIteratorRule- Throws:
IOException
-
-