Class GenericFileHelper
java.lang.Object
org.apache.camel.component.file.GenericFileHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringasExclusiveReadLockKey(String path, String key) static StringasExclusiveReadLockKey(GenericFile file, String key) static <T> org.apache.camel.ExchangecreateDummy(GenericFileEndpoint<T> endpoint, org.apache.camel.Exchange dynamic, Supplier<GenericFile<T>> file) static voidjailToLocalWorkDirectory(File target, File localWorkDirectory) Ensures the resolved local work file stays within the configured local work directory.
-
Method Details
-
jailToLocalWorkDirectory
Ensures the resolved local work file stays within the configured local work directory. The remote file name used to build the local work file path may contain../sequences that would otherwise resolve to a path outside the work directory.- Parameters:
target- the resolved local work file (or its in-progress temp file)localWorkDirectory- the local work directory the file must stay within- Throws:
GenericFileOperationFailedException- if the target resolves outside the local work directory
-
asExclusiveReadLockKey
-
asExclusiveReadLockKey
-
createDummy
public static <T> org.apache.camel.Exchange createDummy(GenericFileEndpoint<T> endpoint, org.apache.camel.Exchange dynamic, Supplier<GenericFile<T>> file)
-