public void fxpDirectory(FTPConnection destination, 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!");

        if (getSecureFXPType() == Command.SSCN && !sscnActive) {
            setSSCNFxp(true);
            sscnActive = true;
        }
   
        destination.makeDirectory(dstDir.toString());

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

        Collections.sort(files);

        for (FTPFile file : files) {
            file.setPath(srcDir.toString());
            if (!file.isDirectory()) {
                fxpFile(destination, file, new FTPFile(dstDir.toString()
                        , file.getName()));
            } else {
                fxpDirectory(destination, file, new FTPFile(dstDir.toString(),
                		file.getName(), true));
            }
        }

        if (getSecureFXPType() == Command.SSCN && sscnActive) {
            setSSCNFxp(false);
            sscnActive = false;
        }
    }