code: protected boolean uploadDirectory(final String ftpServer, final String username, final String password,
                                        final String sourceDirectoryPath, final String targetDirectoryPath) {
          log.debug("FTP username: " + username);
          try {
              final FTPClient ftpClient = getFTPClient(ftpServer, username, password);
  
              log.info(String.format(UPLOAD_DIR_START, sourceDirectoryPath, targetDirectoryPath));
              uploadDirectory(ftpClient, sourceDirectoryPath, targetDirectoryPath, "");
              log.info(String.format(UPLOAD_DIR_FINISH, sourceDirectoryPath, targetDirectoryPath));
  
              ftpClient.disconnect();
              return true;
          } catch (Exception e) {
              log.debug(e);
              log.error(String.format(UPLOAD_DIR_FAILURE, sourceDirectoryPath, targetDirectoryPath));
          }
  
          return false;
      }
docs: Upload directory to specified FTP server without retries.
  
  @param ftpServer
  @param username
  @param password
  @param sourceDirectoryPath
  @param targetDirectoryPath
  @return Boolean to indicate whether uploading is successful.