function __construct($dir = NULL, $format = self::FORMAT_JSON) { if ($dir && !is_dir($dir)) { mkdir($dir, \Base::MODE, TRUE); } $this->uuid = \Base::instance()->hash($this->dir = $dir); $this->format = $format; }