Extension development - how to save a file to some absolute path

Basically title. I want to be able to save my notebook as templates at a user-specified absolute path location. How?

There is a context object on the NotebookPanel instance that contains some methods that facilitate saving the notebook. Please let me know if you need additional assistance getting a reference to the mentioned objects.

In general, the frontend can’t access an absolute path on the server without a dedicated server extension… one can’t even really assume the contents are even backed by a filesystem, as there are database-backed ones, etc.

On jupyterlab-starters we integrate with the ContentsManager on the server side.