The court to which the committing magistrate shall return the depositions and statement, or in which an indictment or information or an appeal is pending, or to which a judgment on appeal is remitted to be carried into effect, may, by an order to be entered on its minutes, direct the arrest of the defendant and commitment to the officer to whose custody the defendant was committed at the time of giving bail, and the defendant's detention until legally discharged, in the following cases:
NRS 178.532