Any court may, on the motion of either party in any action, suit, or proceeding, civil or criminal, pending therein, in which a deposition may be used, or before any commissioners, referees, or auditors appointed by any such court or under a rule from it, grant a commission to take depositions according to law, whenever it may be necessary to prevent a failure or delay of justice, on such terms as such court, by general or special order, may direct; and the deposition, so taken, may be used in any state of the cause, on appeal or otherwise.
R.I. Gen. Laws § 9-18-9