This should also be rethought as soon as \OC\Files\Filesystem::getDirectoryContent supports mimetypes (it doesn't but https://github.com/owncloud/core/blob/master/apps/files/ajax/rawlist.php#L18) says so …
If it won't support mimetypes it's also okay to remove mimetypes everywhere in here.