These docs are for an old release. Info on upgrading to v6

getResources

A method that retrieves all Resources, including children, as a single flat list.

.getResources()

If you want to retrieve a list of top-level resources (resources that are not children of any other resource), then use getTopLevelResources instead.