if ( file.isFile() ) { downloadFile(file, new FTPFile(dstDir.toString() + "/" + srcDir.getName(), file.getName())); }else { downloadDirectory( file, new FTPFile(dstDir  + "/" + srcDir.getName())); }
if ( !file.isDirectory() ) { downloadFile(file, new FTPFile(dstDir.toString() + "/" + srcDir.getName(), file.getName())); }else { downloadDirectory( file, new FTPFile(dstDir.getPath(), srcDir.getName(),true)); }
    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() + "/" + srcDir.getName() ).mkdir();    	    	List<FTPFile> files = getDirectoryListing( srcDir.toString() );    	    	Collections.sort( files );    	    	for(FTPFile file : files) {    		file.setPath( srcDir.toString() );    		if ( file.isFile() ) {    			downloadFile(file, new FTPFile(dstDir.toString() + "/" + srcDir.getName(), file.getName()));    		}else {    			downloadDirectory( file, new FTPFile(dstDir  + "/" + srcDir.getName()));    		}    	}    }