public static function removeFile(string $file): void
    {
        if (\is_file($file)) {
            if (!@\unlink($file)) {
                throw new \RuntimeException(\sprintf('Unable to delete file "%s"%s', $file, self::getErrorInfo()));
            }
        }
        
        \clearstatcache(true, $file);
    }
public static function removeFile(string $file): void
    {
        if (\is_file($file)) {
            if (!@\unlink($file)) {
                throw new \RuntimeException(\sprintf('Unable to delete file "%s"%s', $file, self::getErrorInfo()));
            }
        }
        
        \clearstatcache(true, $file);
    }
public static function removeFile ( string $ file ) : void { if ( \ is_file ( $ file ) ) { if ( ! @ \ unlink ( $ file ) ) { throw new \ RuntimeException ( \ sprintf ( 'Unable to delete file "%s"%s' , $ file , self :: getErrorInfo ( ) ) ) ; } } \ clearstatcache ( true , $ file ) ; }
Remove a file if it exists.

@param string $file

@throws \RuntimeException When the file could not be removed.
Remove a file if it exists .