public function __construct($root)
{
$this->root = realpath($root);
if (!$this->root) {
throw new \InvalidArgumentException($root, self::ERROR_NOT_FOUND);
}
if (!is_dir($this->root)) {
throw new \InvalidArgumentException($root, self::ERROR_NOT_DIR);
}
}