Reference

$files->keys()

Returns an array of all keys

$files->keys(): array

Return type

array

Example

Example Files

  • document.pdf
  • numbers.xls
  • myimage.jpg
  • download.zip
<?php dump($page->files()->keys()) ?>
/*
[
  'document.pdf',
  'numbers.xls',
  'myimage.jpg',
  'download.zip'
]
*/

Source code

kirby/src/Toolkit/Iterator.php#L45