$page->hasDocuments()

Checks if there are any documents (pdf, doc, xls, etc.) in the page's directory.