(self, edit, goto='', to_expand=None, toggle=None, reset_sels=None)
goto
            Optional filename to put the cursor on; used only from "dired_up"

        to_expand
            List of relative paths for direcories which shall be expanded

        toggle
            If true, marked/selected directories shall switch state,
            i.e. expand/collapse

        reset_sels
            If True, previous selections & marks shan’t be restored
goto
            Optional filename to put the cursor on; used only from "dired_up"
goto Optional filename to put the cursor on ; used only from dired_up
def run(self, edit, goto='', to_expand=None, toggle=None, reset_sels=None):
        """
        goto
            Optional filename to put the cursor on; used only from "dired_up"

        to_expand
            List of relative paths for direcories which shall be expanded

        toggle
            If true, marked/selected directories shall switch state,
            i.e. expand/collapse

        reset_sels
            If True, previous selections & marks shan’t be restored
        """
        # after restart ST, callback seems to disappear, so reset callback on each refresh for more reliability
        self.view.settings().clear_on_change('color_scheme')
        self.view.settings().add_on_change('color_scheme', lambda: set_proper_scheme(self.view))

        path = self.path
        names = []
        if path == 'ThisPC\\':
            path, names = '', self.get_disks()
        if path and not exists(path):
            if sublime.ok_cancel_dialog(u'FileBrowser:\n\nDirectory does not exist:\n\n\t%s\n\nTry to go up?' % path, u'Go'):
                self.view.run_command('dired_up')
            return

        emit_event(u'start_refresh', (self.view.id(), path), view=self.view)

        self.expanded = expanded = self.view.find_all(u'^\s*▾') if not reset_sels else []
        self.show_hidden = self.view.settings().get('dired_show_hidden_files', True)
        self.goto = goto
        if os.sep in goto:
            to_expand = self.expand_goto(to_expand)

        self.number_line = 0
        if reset_sels and not to_expand:
            self.index, self.marked, self.sels = [], None, None
            self.populate_view(edit, path, names)
        else:
            if not reset_sels:
                self.index  = self.get_all()
                self.marked = self.get_marked()
                self.sels   = (self.get_selected(), list(self.view.sel()))
            else:
                self.marked, self.sels = None, None
            self.re_populate_view(edit, path, names, expanded, to_expand, toggle)
        emit_event(u'finish_refresh', (self.view.id(), self.expanded + ([path] if path else [])), view=self.view)
def run ( self , edit , goto = '' , to_expand = None , toggle = None , reset_sels = None ) : # after restart ST, callback seems to disappear, so reset callback on each refresh for more reliability self . view . settings ( ) . clear_on_change ( 'color_scheme' ) self . view . settings ( ) . add_on_change ( 'color_scheme' , lambda : set_proper_scheme ( self . view ) ) path = self . path names = [ ] if path == 'ThisPC\\' : path , names = '' , self . get_disks ( ) if path and not exists ( path ) : if sublime . ok_cancel_dialog ( u'FileBrowser:\n\nDirectory does not exist:\n\n\t%s\n\nTry to go up?' % path , u'Go' ) : self . view . run_command ( 'dired_up' ) return emit_event ( u'start_refresh' , ( self . view . id ( ) , path ) , view = self . view ) self . expanded = expanded = self . view . find_all ( u'^\s*▾')  i  n t r set_sels e se [ self . show_hidden = self . view . settings ( ) . get ( 'dired_show_hidden_files' , True ) self . goto = goto if os . sep in goto : to_expand = self . expand_goto ( to_expand ) self . number_line = 0 if reset_sels and not to_expand : self . index , self . marked , self . sels = [ ] , None , None self . populate_view ( edit , path , names ) else : if not reset_sels : self . index = self . get_all ( ) self . marked = self . get_marked ( ) self . sels = ( self . get_selected ( ) , list ( self . view . sel ( ) ) ) else : self . marked , self . sels = None , None self . re_populate_view ( edit , path , names , expanded , to_expand , toggle ) emit_event ( u'finish_refresh' , ( self . view . id ( ) , self . expanded + ( [ path ] if path else [ ] ) ) , view = self . view )