Given a folder (as a string), how do I open that folder in a new window (with the sidebar of the new window showing the contents)?
EDIT:
path = ...
self.window.open_file(path)
doesn’t work, it opens the folder as if it’s a file.
self.window.run_command('open_file', args={'file': path})
does the same thing.
self.window.run_command('open_dir', args={'dir': path})
opens with Finder/File Explorer
self.window.run_command('open_url', args={'url': path})
attempts to open with some sort of default program, also not what I want.
EDIT:
I want the same effect as doing
$ subl path/to/folder
on the command line.