1
0
mirror of https://github.com/danog/file.git synced 2024-11-30 04:19:39 +01:00

Clear stat cache in Fixture

This commit is contained in:
Niklas Keller 2020-10-21 23:17:22 +02:00
parent 075afe23dd
commit 8ed01f294a

View File

@ -65,14 +65,19 @@ final class Fixture
public static function clear(): void
{
\clearstatcache(true);
$fixtureDir = self::path();
if (!\file_exists($fixtureDir)) {
return;
}
if (\stripos(\PHP_OS, "win") === 0) {
\system('rd /Q /S "' . $fixtureDir . '"');
} else {
\system('/bin/rm -rf ' . \escapeshellarg($fixtureDir));
}
\clearstatcache(true);
}
}