use Nette\Utils\Finder;

foreach (Finder::findFiles('*.jpg', '*.png')->in($dir) as $key => $file) {
      dump('getPath: ' . $file->getPath());
      dump('getFileName: ' . $file->getFileName());
      dump('getBasename: ' . $file->getBasename());
      dump('getCTime: ' . $file->getCTime());
      dump('getExtension: ' . $file->getExtension());
      dump('getFileInfo: ' . $file->getFileInfo());
      dump('getFilename: ' . $file->getFilename());
      dump('getGroup: ' . $file->getGroup());
      dump('getInode: ' . $file->getInode());
      //dump('getLinkTarget: ' . $file->getLinkTarget());
      dump('getMTime: ' . $file->getMTime());
      dump('getOwner: ' . $file->getOwner());
      dump('getPath: ' . $file->getPath());
      dump('getPathInfo: ' . $file->getPathInfo());
      dump('getPathname: ' . $file->getPathname());
      dump('getPerms: ' . $file->getPerms());
      dump('getRealPath: ' . $file->getRealPath());
      dump('getSize: ' . $file->getSize());
      dump('getType: ' . $file->getType());
}

 

"getPath: images/galerie/20190101010051" (38)
"getFileName: 02.jpg" (19)
"getBasename: 02.jpg" (19)
"getCTime: 1546367986" (20)
"getExtension: jpg" (17)
"getFileInfo: images/galerie/20190101010051/02.jpg" (49)
"getFilename: 02.jpg" (19)
"getGroup: 33" (12)
"getInode: 29229234" (18)
"getMTime: 1546367986" (20)
"getOwner: 33" (12)
"getPath: images/galerie/20190101010051" (38)
"getPathInfo: images/galerie/20190101010051" (42)
"getPathname: images/galerie/20190101010051/02.jpg" (49)
"getPerms: 33152" (15)
"getRealPath: /app/Home/petra/www/images/galerie/20190101010051/02.jpg" (69)
"getSize: 55986" (14)
"getType: file" (13)

 

Vlastimil Pošmura, 2019