clearstatcache

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Clears file status cache
<?php clearstatcache(bool $clear_realpath_cache = false, string $filename = ""): void
<?php         $result = $this->getProcess()->execute($cmd, $output) === 0;




        clearstatcache();



        if ($result && !is_dir($directory)) {

            return true;
<?php         return $promise->then(function ($process) use ($directory) {


            clearstatcache();



            if ($process->isSuccessful()) {

                if (!is_dir($directory)) {
<?php         } catch (\UnexpectedValueException $e) {



            clearstatcache();

            usleep(100000);

            if (!is_dir($directory)) {

                return true;
<?php             $result = $this->getProcess()->execute($command, $output);




            clearstatcache();



            if (0 === $result) {

                $this->remove($source);
<?php             $result = $this->getProcess()->execute($command, $output);




            clearstatcache();



            if (0 === $result) {

                return;
<?php         if ($this->getProcess()->execute($cmd, $output) !== 0) {

            throw new IOException(sprintf('Failed to create junction to "%s" at "%s".', $target, $junction), 0, null, $target);

        }

        clearstatcache(true, $junction);

    }
<?php         }




        clearstatcache(true, $junction);



        if (!is_dir($junction) || is_link($junction)) {

            return false;
<?php     private function throwException($message, $url)

    {


        clearstatcache();



        if (0 !== $this->process->execute('git --version', $ignoredOutput)) {

            throw new \RuntimeException(Url::sanitize('Failed to clone ' . $url . ', git was not found, check that it is installed and in your PATH env.' . "\n\n" . $this->process->getErrorOutput()));