GEN: Converted code to function getFileTypes