When writing to file or reading from file, a valid file extension must be present.
The following are valid text file extensions:
character(len=3), parameter :: TEXT_EXT(*) = [ "csv", "txt", & ! Allowed text extensions
"log", "rtf", &
"odm", "odt", &
"ods", "odf", &
"xls", "doc", &
"org", "dbf", &
"bed", "gff", &
"gtf" ]
The following are valid binary file extensions:
character(len=3), parameter :: BINARY_EXT(*) = [ "dat", "bin" ] ! Allowed binary extensions
The routines to_file and from_file will detect the file extension used and direct whether to write/read a text file or a binary file. The routines echo, write_file, and read_file accept only text extensions. Other file extensions may be eligible for addition.