Class FtpUtils
- java.lang.Object
-
- org.apache.camel.component.file.remote.FtpUtils
-
public final class FtpUtils extends Object
Various FTP utils.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
compactPath(String path)
Compacts a path by stacking it and reducing .., and uses OS specific file separators (egFile.separator
).static void
ensureRelativeFtpDirectory(org.apache.camel.Component ftpComponent, RemoteFileConfiguration configuration)
Checks whether directory used in ftp/ftps/sftp endpoint URI is relative.static String
extractDirNameFromAbsolutePath(String path)
-
-
-
Method Detail
-
compactPath
public static String compactPath(String path)
Compacts a path by stacking it and reducing .., and uses OS specific file separators (egFile.separator
). Important: This implementation works for the camel-ftp component for various FTP clients and FTP servers using different platforms and whatnot. This implementation has been working for many Camel releases, and is included here to restore patch compatibility with the Camel releases.
-
ensureRelativeFtpDirectory
public static void ensureRelativeFtpDirectory(org.apache.camel.Component ftpComponent, RemoteFileConfiguration configuration)
Checks whether directory used in ftp/ftps/sftp endpoint URI is relative. Absolute path will be converted to relative path and a WARN will be printed.- Parameters:
ftpComponent
-configuration
-- See Also:
- FTP/SFTP/FTPS Component
-
-