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:
parent
075afe23dd
commit
8ed01f294a
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user