(a) General Provisions. -- All orders, findings, pleadings, recordings, exhibits, transcripts or other documents contained in a court file are confidential and are not available for public inspection: Provided, That unless the file is sealed pursuant to section seventeen of this article or access is otherwise prohibited by order, any document in the file shall be available for inspection and copying by the parties, attorneys of record, guardians ad litem, designees authorized by a party in writing and law enforcement. A magistrate or circuit judge may open and inspect the entire contents of the court file in any case pending before the magistrate's or judge's court. When sensitive information has been disclosed in a hearing, pleading or document filing, the court may order such information sealed in the court file. Sealed court files shall be opened only pursuant to section seventeen of this article.
(b) (1) Proceedings are not open to the public. -- Hearings conducted pursuant to this article are closed to the general public except that persons whom the court determines have a legitimate interest in the proceedings may attend.
(2) A person accompanying the petitioner may not be excluded from being present if his or her presence is desired by the person seeking a petition unless the person's behavior is disruptive to the proceeding.
(c) Orders permitting examination or copying of file contents. -- Upon written motion, for good cause shown, the court may enter an order permitting a person who is not permitted access to a court file under subsection (a) to examine and/or copy documents in a file. Such orders shall set forth specific findings which demonstrate why the interests of justice necessitate the examination, copying, or both, and shall specify the particular documents to be examined and/or copied and the arrangements under which such examination, copying, or both, may take place.
(d) Obtaining confidential records. -- Unless both the petitioner and the respondent waive confidentiality in writing, records contained in the court file may not be obtained by subpoena but only by court order and upon full compliance with statutory and case law requirements.