$page->hasFiles()

Checks if there are any files in the page's directory

  • return (integer)

Example

<?php
echo $page->hasFiles(); //returns the number of files in the folder

if($page->hasFiles()) {
  $files = $page->files()
}
?>