Package org.apache.camel.component.file
Class MoveExistingFileStrategyUtils
- java.lang.Object
-
- org.apache.camel.component.file.MoveExistingFileStrategyUtils
-
public final class MoveExistingFileStrategyUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
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=Move&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
-
-