A defendant who is in custody when an indictment, information, or affidavit on which she or he can be tried is filed may apply for a writ of habeas corpus attacking the indictment, information, or affidavit, or the defendant may move to dismiss the indictment, information, or affidavit. A defendant who has been confined for 30 days after her or his arrest without a trial shall be allowed a preliminary hearing upon application.
Fla. Stat. § 907.045
Former s. 909.04.