Class FtpUtils


  • public class FtpUtils
    extends Object
    • Constructor Detail

      • FtpUtils

        public FtpUtils()
    • Method Detail

      • cleanDirectory

        public static void cleanDirectory​(org.apache.commons.net.ftp.FTPClient ftpClient,
                                          String dir)
                                   throws IOException
        Clean a directory by delete all its sub files and sub directories recursively.
        Throws:
        IOException
      • removeDirectory

        public static void removeDirectory​(org.apache.commons.net.ftp.FTPClient ftpClient,
                                           String parentDir,
                                           String currentDir,
                                           boolean removeOnlyContent)
                                    throws IOException
        Removes a non-empty directory by delete all its sub files and sub directories recursively. And finally remove the directory if requested.
        Throws:
        IOException