java.lang.Object
com.aoapps.hodgepodge.io.FileExistsRule
- All Implemented Interfaces:
FilesystemIteratorRule
Conditionally uses one of two rules based on the existence of a file on the current server.
The
existsRule
is used if ANY one of the fullPaths
exists.
The notExistsRule
is used if NONE of the fullPaths
exist.- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from interface com.aoapps.hodgepodge.io.FilesystemIteratorRule
OK, SKIP
-
Constructor Summary
ConstructorDescriptionFileExistsRule
(String[] fullPaths, FilesystemIteratorRule existsRule, FilesystemIteratorRule notExistsRule) -
Method Summary
Modifier and TypeMethodDescriptiongetEffectiveRule
(String filename) boolean
isIncluded
(String filename) Gets if this item should be included.
-
Constructor Details
-
FileExistsRule
public FileExistsRule(String[] fullPaths, FilesystemIteratorRule existsRule, FilesystemIteratorRule notExistsRule)
-
-
Method Details
-
getEffectiveRule
- Throws:
IOException
-
isIncluded
Description copied from interface:FilesystemIteratorRule
Gets if this item should be included.- Specified by:
isIncluded
in interfaceFilesystemIteratorRule
- Throws:
IOException
-