Add file extension function to allow code generators to determine file type