public function isDir(string $name)
    {
        $current = $this->pwd();
        try {
            $this->chDir($name);
            $this->chDir($current);
            return true;
        } catch (\Exception $e) {
            // do nothing
        }
        return false;
    }