private static function createIndexFilesToPreventDirectoryListing($path)
{
if (!self::isPathWithinTmpFolder($path)) {
return;
}
$filesToCreate = array($path . '/index.htm', $path . '/index.php');
foreach ($filesToCreate as $file) {
@file_put_contents($file, 'Nothing to see here.');
}
}