Thomas Morke appeals from an order quashing his petition for an alternative writ of mandamus to compel disclosure of public records by Jennifer Donnelly, records custodian of the department of health and social services, under sec. 19.37(l)(a), Stats. Under that statute, if the custodian of a public record rejects a request for access to the record, the requester may bring an action for mandamus asking a court to *221order release of the record. The issue is whether the trial court abused its discretion when it quashed the petition without inspecting the records Morke sought to reach. Since the facts are undisputed and provided a basis for the custodian's decision, we hold that the court was not required to inspect the records. We therefore affirm.
According to his petition, while an inmate of a Wisconsin correctional institution, Morke read a newspaper report that hacksaw blades had been found in an inmate's cell at Waupun Correctional Institution and investigators were looking for a gun said to have been smuggled into the prison. Waupun is a maximum security prison. Morke requested from the Waupun records custodian copies of relevant incident reports, the request by the correctional officers' union representative for a lockdown and search as a result of the hacksaw/gun incident, and the prison superintendent's reply. The prison records custodian declined on grounds that the material was "subject to an ongoing and sensitive investigation which deals with the safety and security of the institution."
Morke's petition shows that he then requested Don-nelly to review the decision by the prison records custodian. He advised Donnelly that the records "will not be used for any unlawful purpose." Donnelly informed him that no record existed of the union representative's request and the prison superintendent's response, since both were oral. She denied the balance of his request because an investigation was continuing and "disclosure of the records would present an increased risk that you or other prisoners would defeat our security measures, thereby presenting the possibility of an escape attempt or violent incident within our institutions. Disclosure would be of clear overriding harm to the public interest."
*222The trial court held that because Donnelly's denial of Morke's request was accompanied by an explanation of her reasons, and because her reasons were sufficient, Morke's petition failed to state a claim. The court therefore quashed the petition. An order quashing a petition for mandamus is the same as an order dismissing the petition, Mazurek v. Miller, 100 Wis. 2d 426, 430, 303 N.W.2d 122, 125 (Ct. App. 1981), and we discuss it as such. It is undisputed that the court did not examine the actual records before reaching its decision.
A trial court's decision to grant or deny a petition for mandamus will be upheld unless the court abused its discretion. State ex rel. Kurkierewicz v. Cannon, 42 Wis. 2d 368, 375-76, 166 N.W. 255, 258 (1969). A trial court abuses its discretion if it exercises its discretion on the basis of an error of law. State v. Hutnik, 39 Wis. 2d 754, 763, 159 N.W.2d 733, 737 (1968).
Morke claims the court erred as a matter of law by dismissing his petition without inspecting the records he sought. He relies on State ex rel. Youmans v. Owens, 28 Wis. 2d 672, 682, 137 N.W.2d 470, 475 (1965). The You-mans court held that if an action is brought to compel inspection of public records and the records custodian relies upon harm to the public interest when refusing an inspection,
the proper procedure is for the trial judge to examine in camera the record or document sought to be inspected. Upon making such in camera examination, the trial judge should then make his determination of whether or not the harm likely to result to the public interest by permitting the inspection outweighs the benefit to be gained by granting inspection.
*223Id. (footnote omitted).
We conclude that because their contents are undisputed, the trial court was not required to inspect the documents. When a demand is made for an inspection under the public records law, the custodian has the burden of persuading the finder of fact that the proffered facts are true if a factual dispute exists. Fox v. Bock, 149 Wis. 2d 403, 417, 438 N.W.2d 589, 595 (1989). Conversely, if no factual dispute exists, the custodian need not prove to the finder of fact that the proffered facts are true.
The custodian conceded that Morke's petition accurately set forth the pertinent facts. Morke's petition describes the requested documents as "any and all Form C-98 incident reports, which have been made regarding that hacksaw/gun incident." That the incident occurred and that an investigation followed is undisputed.
Morke does not challenge these facts. He challenges only the custodian's conclusion that the documents involve "sensitive matters of prison security." The challenge is absurd. The reports regarding the "hacksaw/gun incident" necessarily involve a security matter. Indeed, Morke attempted to assure Donnelly in his request that he would not use the records "for any unlawful purpose or for any purpose which would . . . threaten the security . . ." of a correctional facility.
Moreover, sec. 19.35(l)(a), Stats., provides that a records custodian may use the public policy grounds listed in sec. 19.85 to deny public access to a record if the custodian "makes a specific demonstration that there is a need to restrict public access at the time that the request ... is made." One ground specified in sec. 19.85(l)(d) is "considering strategy for crime detection or prevention." Donnelly specifically demonstrated a *224need to restrict public access to the records sought on the public policy ground recognized in sec. 19.85(l)(d), which she restated in terms of security reasons, escape attempts, and violence within the prison. It is a felony for a person to introduce into an institution, with intent to aid a prisoner to escape, anything adapted or useful in making an escape, sec. 946.44(l)(b), Stats., to introduce a firearm into an institution where prisoners are detained, sec. 946.44(lm), and for a person in custody to escape, sec. 946.42(3).
The undisputed nature of the records provides ample support for the custodian's explanation of her refusal to allow public access to the records. The trial court need not undertake a useless examination to determine whether the records are as Morke described them.
By the Court. — Order affirmed.