src/Extractor/Util/Filesystem.php
private function unlink($path)
    {
        if (!@$this->unlinkImplementation($path)) {
            // retry after a bit on windows since it tends to be touchy with mass removals
            if (!defined('PHP_WINDOWS_VERSION_BUILD') || (usleep(350000) && !@$this->unlinkImplementation($path))) {
                $error = error_get_last();
                $message = 'Could not delete '.$path.': '.@$error['message'];
                if (defined('PHP_WINDOWS_VERSION_BUILD')) {
                    $message .= "\nThis can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed";
                }

                throw new \RuntimeException($message);
            }
        }

        return true;
    }
private function unlink($path)
    {
        if (!@$this->unlinkImplementation($path)) {
            // retry after a bit on windows since it tends to be touchy with mass removals
            if (!defined('PHP_WINDOWS_VERSION_BUILD') || (usleep(350000) && !@$this->unlinkImplementation($path))) {
                $error = error_get_last();
                $message = 'Could not delete '.$path.': '.@$error['message'];
                if (defined('PHP_WINDOWS_VERSION_BUILD')) {
                    $message .= "\nThis can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed";
                }

                throw new \RuntimeException($message);
            }
        }

        return true;
    }
private function unlink ( $ path ) { if ( ! @ $ this -> unlinkImplementation ( $ path ) ) { // retry after a bit on windows since it tends to be touchy with mass removals if ( ! defined ( 'PHP_WINDOWS_VERSION_BUILD' ) || ( usleep ( 350000 ) && ! @ $ this -> unlinkImplementation ( $ path ) ) ) { $ error = error_get_last ( ) ; $ message = 'Could not delete ' . $ path . ': ' . @ $ error [ 'message' ] ; if ( defined ( 'PHP_WINDOWS_VERSION_BUILD' ) ) { $ message .= "\nThis can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed" ; } throw new \ RuntimeException ( $ message ) ; } } return true ; }
Attempts to unlink a file and in case of failure retries after 350ms on windows

@param  string $path
@return bool

@throws \RuntimeException
Attempts to unlink a file and in case of failure retries after 350ms on windows