private void deleteFile(DomainFile file) throws CancelledException {
		if (file.isOpen()) {
			statistics.incrementFileInUse();
			showFileInUseDialog(file);
			return;
		}

		if (file.isVersioned() && file.isCheckedOut()) {
			showCheckedOutVersionedDialog(file);
			statistics.incrementCheckedOutVersioned();
			return;
		}

		if (file.isReadOnly()) {
			int result = showConfirmReadOnlyDialog(file);
			if (result == OptionDialog.CANCEL_OPTION) {
				throw new CancelledException();
			}
			if (result != OptionDialog.YES_OPTION) {
				statistics.incrementReadOnly();
				return;
			}
		}

		if (file.isVersioned()) {
			int result = showConfirmDeleteVersionedDialog(file);
			if (result == OptionDialog.CANCEL_OPTION) {
				throw new CancelledException();
			}
			if (result != OptionDialog.YES_OPTION) {
				statistics.incrementVersioned();
				return;
			}
		}

		try {
			file.delete();
			statistics.incrementDeleted();
		}
		catch (IOException e) {
			statistics.incrementGeneralFailure();
			OptionDialogBuilder builder = new OptionDialogBuilder("Delete File Failed",
				file.getName() + ": " + e.getMessage());
			int result =
				builder.addCancel().setMessageType(OptionDialog.ERROR_MESSAGE).show(parent);
			if (result == OptionDialog.CANCEL_OPTION) {
				throw new CancelledException();
			}
		}
	}
Construct a new DeleteProjectFilesTask with the list of folders and files to delete.

@param folders the fist of DomainFolders (and all files contained recursively 
in those folders) to delete
@param files the list of DomainFiles to delete
@param fileCount the number of files being deleted
@param parent the component to use for parenting any dialogs that are shown
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/projectdata/actions/DeleteProjectFilesTask.java