private function deleteCacheDirectories($deletedFileCount) { /** @var DirectoryIterator $cacheDirectoryIterator */
$cacheDirectoryIterator =
$this->
getDirectoryIterator($this->shopwarePath . '/var/cache'
);
$deleteResult =
new DeleteResult($deletedFileCount);
foreach ($cacheDirectoryIterator as $directory) { if ($directory->
isDot() ||
$directory->
isFile()) { continue;
} $iterator =
new RecursiveIteratorIterator( new RecursiveDirectoryIterator($directory->
getRealPath(), FilesystemIterator::SKIP_DOTS
),
RecursiveIteratorIterator::CHILD_FIRST
);
/** @var SplFileInfo $path */
foreach ($iterator as $path) { if ($path->
getFilename() === '.gitkeep'
) {