if (added && dir.getFile(info.Name, false).exists()) { SVNErrorManager.error(0, null);
if (added && dir.getFile(info.Name, false).exists()) { SVNErrorManager.error("svn: Failed to add file '" + path + "': object of the same name already exists");
    private SVNFileInfo createFileInfo(SVNDirectoryInfo parent, String path, boolean added) throws SVNException {        SVNFileInfo info = new SVNFileInfo(parent, path);        info.IsAdded = added;        info.Name = PathUtil.tail(path);        SVNDirectory dir = parent.getDirectory();        if (added && dir.getFile(info.Name, false).exists()) {            SVNErrorManager.error(0, null);        }        SVNEntries entries = null;        try {            entries = dir.getEntries();            SVNEntry entry = entries.getEntry(info.Name);            if (added && entry != null && entry.isScheduledForAddition()) {                SVNErrorManager.error(0, null);            }            if (!added && entry == null) {                SVNErrorManager.error(0, null);            }            if (mySwitchURL != null || entry == null) {                info.URL = PathUtil.append(parent.URL, PathUtil.encode(info.Name));            } else if (entry != null) {                info.URL = entry.getURL();            }         } finally {            if (entries != null) {                entries.close();            }        }        parent.RefCount++;        return info;    }