public void downloadDirectory(FTPFile srcDir, FTPFile dstDir)
            throws IOException, FtpWorkflowException, FtpIOException {
        if (!srcDir.isDirectory())
            throw new FtpFileNotFoundException("Downloading: "
                    + srcDir.getName()
                    + " is not possible, it's not a directory!");

        new File(dstDir.toString()).mkdir();

        
        String listDir = srcDir.toString();
        listDir = (listDir.endsWith("/") ? listDir.substring(0, listDir
                .length() - 1) : listDir);
        List<FTPFile> files = getDirectoryListing(listDir);
//        List<FTPFile> files = getDirectoryListing(srcDir.toString());

        Collections.<FTPFile>sort(files);

        for (FTPFile file : files) {
            file.setPath(srcDir.toString());
            if (!file.isDirectory()) {
                downloadFile(file, new FTPFile(dstDir.toString(), file.getName(), false));
            } else {
                downloadDirectory(file, new FTPFile(dstDir.toString(), file
                        .getName(), true));
            }
        }
    }