$file->hasPrev()

Checks if there's a previous sibling

  • return (boolean)

Example

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

if($file->hasPrev()) {
  echo 'Previous file: ' . $file->prev()->filename();
}

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