Newscoop\Storage::__construct PHP Method

__construct() public method

public __construct ( string $root )
$root string
    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);
        }
    }