code: def read(self):
          
          assert self.path == self.target.cur_dir
          try:
              self.modified_list = False
              self.modified_sync = False
              is_valid_file = False
  
              s = self.target.read_text(self.filename)
              # print("s", s)
              if self.target.synchronizer:
                  self.target.synchronizer._inc_stat("meta_bytes_read", len(s))
              self.was_read = True  # True if a file exists (even invalid)
              self.dir = json.loads(s)
              # import pprint
              # print("dir")
              # print(pprint.pformat(self.dir))
              self.dir = make_native_dict_keys(self.dir)
              # print(pprint.pformat(self.dir))
              self.list = self.dir["mtimes"]
              self.peer_sync = self.dir["peer_sync"]
              is_valid_file = True
              # write"DirMetadata: read(%s)" % (self.filename, ), self.dir)
          # except IncompatibleMetadataVersion:
          #     raise  # We want version errors to terminate the app
          except Exception as e:
              write_error("Could not read meta info {}: {!r}".format(self, e))
  
          # If the version is incompatible, we stop, unless:
          # if --migrate is set, we simply ignore this file (and probably replace it
          # with a current version)
          if is_valid_file and self.dir.get("_file_version", 0) != self.VERSION:
              if not self.target or not self.target.get_option("migrate"):
                  raise IncompatibleMetadataVersion(
                      "Invalid meta data version: {} (expected {}).\n"
                      "Consider passing --migrate to discard old data.".format(
                          self.dir.get("_file_version"), self.VERSION
                      )
                  )
              #
              write(
                  "Migrating meta data version from {} to {} (discarding old): {}".format(
                      self.dir.get("_file_version"), self.VERSION, self.filename
                  )
              )
              self.list = {}
              self.peer_sync = {}
  
          return
docs: Initialize self from .pyftpsync-meta.json file.