Currently you’d need to iterate through each file individually.
The two possibilities I can think of to retrieve the list of files would be using the REST API and a query, or parsing the HTML browse view which is similar to the old directory listing.