The magistrate must keep the depositions of witnesses or transcript of preliminary examination taken at such preliminary examination until the same is returned to the proper court; and such magistrate must not permit the same to be examined or copied by any person except a judge of a court having jurisdiction of the offense, or authorized to issue writs of habeas corpus, the attorney-general, prosecuting attorney, or other prosecuting attorney, and the defendant and his counsel.
Idaho Code § 19-813