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;
}