copyVersionedFile(childTo, wcAccess.getTarget(), entry.getName(), revision, force, eolStyle);
copyVersionedFile(childTo, wcAccess.getTarget(), entry.getName(), revision, eolStyle);
    private void copyVersionedDir(File from, File to, SVNRevision revision, String eolStyle, boolean force, boolean recursive) throws SVNException {        SVNWCAccess wcAccess = SVNWCAccess.create(from);        wcAccess.open(false, false);        SVNEntry targetEntry = wcAccess.getTargetEntry();        if (targetEntry == null) {            SVNErrorManager.error("svn: '" + from + "' is not under version control or doesn't exist");        }        if (revision == SVNRevision.WORKING && targetEntry.isScheduledForDeletion()) {            return;        }        if (revision != SVNRevision.WORKING && targetEntry.isScheduledForAddition()) {            return;        }        if (targetEntry.isDirectory()) {            // create dir            boolean dirCreated = to.mkdirs();            if (!to.exists() || to.isFile()) {                SVNErrorManager.error("svn: Cannot create destination directory");            }            if (!dirCreated && to.isDirectory() && !force) {                SVNErrorManager.error("svn: Destination directory exists, and will not be overwritten unless forced");            }            // read entries            SVNEntries entries = wcAccess.getTarget().getEntries();            for (Iterator ents = entries.entries(false); ents.hasNext();) {                SVNEntry entry = (SVNEntry) ents.next();                if (entry.isDirectory()) {                    if ("".equals(entry.getName())) {                        continue;                    } else if (recursive) {                        File childTo = new File(to, entry.getName());                        File childFrom = new File(from, entry.getName());                        copyVersionedDir(childFrom, childTo, revision, eolStyle, force, recursive);                    }                } else if (entry.isFile()) {                    File childTo = new File(to, entry.getName());                    copyVersionedFile(childTo, wcAccess.getTarget(), entry.getName(), revision, force, eolStyle);                }            }        } else if (targetEntry.isFile()) {            copyVersionedFile(to, wcAccess.getTarget(), wcAccess.getTargetName(), revision, force, eolStyle);        }    }