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.