}, null);
}
public static void delete(SVNWCAccess wcAccess, SVNAdminArea root, File path, boolean deleteFiles, boolean cancellable) throws SVNException {
SVNAdminArea dir = wcAccess.probeTry(path, true, SVNWCAccess.INFINITE_DEPTH);
SVNEntry entry = null;
if (dir != null) {
entry = wcAccess.getEntry(path, false);
} else {
SVNWCManager.doDeleteUnversionedFiles(wcAccess, path, deleteFiles);
return;
}
if (entry == null) {
SVNWCManager.doDeleteUnversionedFiles(wcAccess, path, deleteFiles);
return;
}
if (entry.getExternalFilePath() != null) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_CANNOT_DELETE_FILE_EXTERNAL,
"Cannot remove the file external at ''{0}''; please propedit or propdel the svn:externals description that created it",
path);
SVNErrorManager.error(err, SVNLogType.WC);
}
String schedule = entry.getSchedule();
SVNNodeKind kind = entry.getKind();
boolean copied = entry.isCopied();
boolean deleted = false;
String name = path.getName();
if (kind == SVNNodeKind.DIR) {
SVNAdminArea parent = wcAccess.retrieve(path.getParentFile());
SVNEntry entryInParent = parent.getEntry(name, true);
deleted = entryInParent != null ? entryInParent.isDeleted() : false;
if (!deleted && SVNProperty.SCHEDULE_ADD.equals(schedule)) {
if (dir != root) {
dir.removeFromRevisionControl("", false, false);
} else {
parent.deleteEntry(name);