Cachearium\Backend\CacheFilesystem::setPath PHP Method

setPath() public method

Sets path to store data
public setPath ( string $path ) : CacheFS
$path string
return CacheFS
    public function setPath($path)
    {
        if (!is_writable($this->path) || !file_exists($this->path) || !is_dir($this->path)) {
            throw new RuntimeException('Invalid dir or missing permissions');
        }
        $this->path = $path . '/';
        // reload
        if ($this->isEnabled()) {
            $this->enable();
        }
        return $this;
    }