def path_exists(self, path):
path = path.strip('<STR_LIT:/>')<EOL>if path != '<STR_LIT>':<EOL><INDENT>spec = {'<STR_LIT:path>': path}<EOL>count = self._connect_collection(self.notebook_collection).find(spec).count()<EOL><DEDENT>else:<EOL><INDENT>count = <NUM_LIT:1><EOL><DEDENT>return count > <NUM_LIT:0><EOL>
Does the API-style path (directory) actually exist?

        Parameters
        ----------
        path : string
            The path to check. This is an API path (`/` separated,
            relative to base notebook-dir).

        Returns
        -------
        exists : bool
            Whether the path is indeed a directory.