added a filetype enum and function to retrieve from a file