code: def set_current_folder(self, folder):
          
          index = self.fsmodel.setRootPath(folder)
          self.__last_folder = folder
          if self.show_cd_only:
              if self.__original_root_index is None:
                  self.__original_root_index = self.rootIndex()
              self.setRootIndex(index)
          return index
docs: Set current folder and return associated model index