$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()
}
?>

Is something missing or incorrect? Edit this page on Github…