getFileContents and getCollectionContents joined in getContents