3102. Method of obtaining disclosure. (a) Disclosure devices. Information is obtainable by one or more of the following disclosure devices: depositions upon oral questions or without the state upon written questions, interrogatories, demands for addresses, discovery and inspection of documents or property, physical and mental examinations of persons, and requests for admission. (b) Stipulation or notice normal method. Unless otherwise provided by the civil practice law and rules or by the court, disclosure shall be obtained by stipulation or on notice without leave of the court. (c) Before action commenced. Before an action is commenced, disclosure to aid in bringing an action, to preserve information or to aid in arbitration, may be obtained, but only by court order. The court may appoint a referee to take testimony. (d) After trial commenced. Except as provided in section 5223, during and after trial, disclosure may be obtained only by order of the trial court on notice. (e) Action pending in another jurisdiction. Except as provided in section three thousand one hundred nineteen of this article, when under any mandate, writ or commission issued out of any court of record in any other state, territory, district or foreign jurisdiction, or whenever upon notice or agreement, it is required to take the testimony of a witness in the state, he or she may be compelled to appear and testify in the same manner and by the same process as may be employed for the purpose of taking testimony in actions pending in the state. The supreme court or a county court shall make any appropriate order in aid of taking such a deposition. (f) Action to which state is party. In an action in which the state is properly a party, whether as plaintiff, defendant or otherwise, disclosure by the state shall be available as if the state were a private person.