How do I get the uri of the currently open file?

I’m editing a widget,How do I get the uri of the currently open file?

@Dennis thank you for the discussion, you can use our api documentation in most cases to search keywords to find what you’re looking for.

In this case you can use either activeEditor or currentEditor from the EditorManager to get the editor in question. From it you’ll have access to the underlying editor which exposes the uri.