Pagination vs. Infinite Scrolling for page displaying Folders and Files

We have pages which display the contents of a Folder. A Folder can contain zero to many Folders and zero to many Files.

Implementing pagination in this scenario seems awkward — what if my page has 35 Folders and 75 Files, say, and my page size is 25? Page one will be filled with Folders. Page two will have 10 Folders and 15 Files…just seems awkward.

So is infinite scrolling a better option here? Seems like it.

Thank you