code: def GetTARInfo(self):
      
      if not self._tar_info:
        location = getattr(self.path_spec, 'location', None)
        if location is None:
          raise errors.PathSpecError('Path specification missing location.')
  
        if not location.startswith(self._file_system.LOCATION_ROOT):
          raise errors.PathSpecError('Invalid location in path specification.')
  
        if len(location) == 1:
          return None
  
        tar_file = self._file_system.GetTARFile()
        try:
          self._tar_info = tar_file.getmember(location[1:])
        except KeyError:
          pass
  
      return self._tar_info
docs: Retrieves the TAR info.
  
      Returns:
        tarfile.TARInfo: TAR info or None if it does not exist.
  
      Raises:
        PathSpecError: if the path specification is incorrect.