I have a plugin that I want to control the contents of the default file browser, but I have no idea how to interact with the default file browser. I see “IDefaultFileBrowser” in the common tokens section, but it throws a typescript error if I try to require it in my plugin. Or is there a different token/service/plugin/whatever that I should be looking at instead? Basically I want to be able to check if a file exists, and if it does not, give the user the ability to click a button and it will be added.
I did find app.serviceManager.contents which seems like it may be the right direction.
ServiceManager is the way for checking if file exists.
How can I refresh the default file browser? I’ve updated the file system asynchronously, but it appears I need to refresh to show the changes.
browser.model.refresh() should work where browser comes from the
IDefaultFileBrowser token. What error did you see when trying to require this token?