The accused person shall be permitted to inspect all matters relevant to the case. Depositions shall not be taken or used except by written agreement of both parties filed with the court or by order of the court upon such conditions as the court may prescribe.