Class FtpUtils


  • public class FtpUtils
    extends Object
    FtpUtils.
    Author:
    Andreas Rudolph
    • Method Detail

      • createClient

        public static org.apache.commons.net.ftp.FTPClient createClient()
                                                                 throws IOException
        Throws:
        IOException
      • downloadToFile

        public static void downloadToFile​(org.apache.commons.net.ftp.FTPClient client,
                                          String remotePath,
                                          File targetFile)
                                   throws IOException
        Throws:
        IOException
      • openClient

        public static org.apache.commons.net.ftp.FTPClient openClient​(String host,
                                                                      int port,
                                                                      boolean passive)
                                                               throws IOException
        Throws:
        IOException
      • deleteRecursively

        public static void deleteRecursively​(org.apache.commons.net.ftp.FTPClient client,
                                             String remotePath)
                                      throws IOException
        Throws:
        IOException
      • deleteRecursively

        public static void deleteRecursively​(org.apache.commons.net.ftp.FTPClient client,
                                             String remotePath,
                                             org.apache.commons.net.ftp.FTPFile file)
                                      throws IOException
        Throws:
        IOException
      • getWorkingDirectory

        public static String getWorkingDirectory​(org.apache.commons.net.ftp.FTPClient client)
                                          throws IOException
        Throws:
        IOException
      • storeEmptyFile

        public static boolean storeEmptyFile​(org.apache.commons.net.ftp.FTPClient client,
                                             String remotePath)
                                      throws IOException
        Throws:
        IOException