A backport of the Plone 5 folder contents implementation.