$file->hasNext()

Checks if there's a next sibling

  • return (boolean)

Example

$file = $page->file('myfile.pdf');

if($file->hasNext()) {
  echo 'Next file: ' . $file->next()->filename();
}