Package org.ocpsoft.rewrite.config
Class Filesystem
java.lang.Object
org.ocpsoft.rewrite.config.Filesystem
- All Implemented Interfaces:
Condition,Parameterized
- Author:
- Lincoln Baxter, III
-
Method Summary
Modifier and TypeMethodDescriptionstatic FilesystemdirectoryExists(File resource) booleanevaluate(Rewrite event, EvaluationContext context) Evaluate this condition against the givenRewriteevent.static FilesystemfileExists(File resource) Get theParameterizedPatternof thisFilesystem.Get all requiredParameternames for thisParameterizedinstance.voidsetParameterStore(ParameterStore store) Initialize thisParameterizedinstance with the globalParameterStore.
-
Method Details
-
evaluate
Description copied from interface:ConditionEvaluate this condition against the givenRewriteevent. If this condition does not apply to the given event, it must return false. If the condition applies and is satisfied, return true. -
fileExists
Create aConditionthat returnstrueif the givenFileexists in the file-system of the host environment, and is a normal file.The given file path may be parameterized:
new File("/tmp/file.txt")
new File("c:\tmp\{param}.txt")
...- Parameters:
location-ParameterizedPatternspecifying the location of theFile.
-
directoryExists
Create aConditionthat returnstrueif the givenFileexists in the file-system of the host environment, and is a directory.The given file path may be parameterized:
new File("/tmp/directory/")
new File("c:\tmp\{param}")
...- Parameters:
location-ParameterizedPatternspecifying the location of the directory.
-
getExpression
Get theParameterizedPatternof thisFilesystem. -
getRequiredParameterNames
Description copied from interface:ParameterizedGet all requiredParameternames for thisParameterizedinstance.- Specified by:
getRequiredParameterNamesin interfaceParameterized
-
setParameterStore
Description copied from interface:ParameterizedInitialize thisParameterizedinstance with the globalParameterStore.- Specified by:
setParameterStorein interfaceParameterized
-