Group files by type.