code: def _flush_index(self):
          
          data = {'version': self.version, 'index': self._index}
          with open(self._get_path('index.json'), 'w') as f:
              json.dump(data, f)
          self.__index = None
docs: Writes the current list of file paths in the index to the json file
          and then sets self.__index = None.