private function isValidHomeDirectory(string $path): bool
    {
        $valid = false;
        if ('~/' === substr($path, 0, 2)) {
            $valid = $this->isValidFullPath(
                $this->expandHomeDirectory($path)
            );
        }

        return $valid;
    }