Except in a criminal proceeding or other proceeding in which a party is entitled to court-appointed counsel, the prevailing party in an original proceeding is entitled to costs if the court resolves the proceeding after issuing an alternative writ, an order to show cause, or a peremptory writ in the first instance.
Cal. R. Ct. 8.936