SPL: DirectoryIterator

foreach (new DirectoryIterator(‘.’) as $fileInfo) {
//if($fileInfo->isDot()) continue;

echo “Name: “.$fileInfo->getFilename() . “n”;
echo
“Last : “.date(“d/m/Y H:i”, $fileInfo->getCTime()) . “n”;
echo
“Size: “.$fileInfo->getSize() . ” byten”;
echo
“Type: “.$fileInfo->getType() . “n”; //dir or file
echo “Executable: “.($fileInfo->isExecutable()?“yes”:“no”) . “n”;
echo
“Readable: “.($fileInfo->isReadable()?“yes”:“no”) . “n”;
echo
“Writable: “.($fileInfo->isWritable()?“yes”:“no”) . “n”;
}