Behat\Gherkin\Cache\FileCache::__construct PHP Method

__construct() public method

Initializes file cache.
public __construct ( string $path )
$path string Path to the folder where to store caches.
    public function __construct($path)
    {
        $this->path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'v' . Gherkin::VERSION;
        if (!is_dir($this->path)) {
            @mkdir($this->path, 0777, true);
        }
        if (!is_writeable($this->path)) {
            throw new CacheException(sprintf('Cache path "%s" is not writeable. Check your filesystem permissions or disable Gherkin file cache.', $this->path));
        }
    }