code: private static void doCopyDirectory(File srcDir, File destDir, FileFilter filter, boolean preserveFileDate,
  			List<String> exclusionList) throws IOException {
  		if (destDir.exists()) {
  			if (destDir.isDirectory() == false) {
  				throw new IOException("Destination '" + destDir + "' exists but is not a directory");
  			}
  		} else {
  			if (destDir.mkdirs() == false) {
  				throw new IOException("Destination '" + destDir + "' directory cannot be created");
  			}
  			if (preserveFileDate) {
  				destDir.setLastModified(srcDir.lastModified());
  			}
  		}
  		if (destDir.canWrite() == false) {
  			throw new IOException("Destination '" + destDir + "' cannot be written to");
  		}
  		// recurse
  		File[] files = filter == null ? srcDir.listFiles() : srcDir.listFiles(filter);
  		if (files == null) { // null if security restricted
  			throw new IOException("Failed to list contents of " + srcDir);
  		}
  		for (int i = 0; i < files.length; i++) {
  			File copiedFile = new File(destDir, files[i].getName());
  			if (exclusionList == null || !exclusionList.contains(files[i].getCanonicalPath())) {
  				if (files[i].isDirectory()) {
  					doCopyDirectory(files[i], copiedFile, filter, preserveFileDate, exclusionList);
  				} else {
  					doCopyFile(files[i], copiedFile, preserveFileDate);
  				}
  			}
  		}
  	}
docs: Internal copy directory method.
  
  @param srcDir
  the validated source directory, must not be <code>null</code>
  @param destDir
  the validated destination directory, must not be
  <code>null</code>
  @param filter
  the filter to apply, null means copy all directories and files
  @param preserveFileDate
  whether to preserve the file date
  @param exclusionList
  List of files and directories to exclude from the copy, may be
  null
  @throws IOException
  if an error occurs
  @since Commons IO 1.1