Package org.apache.camel.component.file
Class MoveExistingFileStrategyUtils
java.lang.Object
org.apache.camel.component.file.MoveExistingFileStrategyUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
completePartialRelativePath
(String destinationPath, String fileOnlyName, String directoryName) This method manipulates the destinationPath in case of moveExisting parameter is expressed as file language expression subdirectory name of the directoryName adding directoryName on top and file name at the end.
-
Method Details
-
completePartialRelativePath
public static String completePartialRelativePath(String destinationPath, String fileOnlyName, String directoryName) This method manipulates the destinationPath in case of moveExisting parameter is expressed as file language expression subdirectory name of the directoryName adding directoryName on top and file name at the end. for example, a camel endpoint like that: file://data/file?fileExist=Moveinvalid input: '&moveExisting'=archive-${date:now:yyyyMMddHHmmssSSS}/ directoryName = data/file, fileOnlyName = whatever.ext, destinationPath = archive-20201110115125770 the outcome of this method would be data/file/archive-20201110115125770/whatever.ext- Parameters:
destinationPath
- the destination pathfileOnlyName
- the file name without the pathdirectoryName
- the path of the file to be moved/renamed- Returns:
- the full destination path
-