code: def check_status(self, basepath=None):
          
          if basepath is None:
              fullpath = self.path
          else:
              fullpath = os.path.join(basepath, self.path)
  
          exists = os.path.exists(fullpath)
          if not exists:
              if self.flags & FileFlags.gz_mask != 0:
                  fullpath += '.gz'
                  exists = os.path.exists(fullpath)
          if exists:
              if self.status == FileStatus.superseded:
                  pass
              else:
                  self.status = FileStatus.exists
          else:
              if self.status in [FileStatus.no_file,
                                 FileStatus.expected,
                                 FileStatus.missing,
                                 FileStatus.temp_removed]:
                  if self.flags & FileFlags.rmint_mask != 0:
                      self.status = FileStatus.temp_removed
              elif self.status == FileStatus.exists:
                  self.status = FileStatus.missing
              elif self.status == FileStatus.exists:
                  self.status = FileStatus.temp_removed
          return self.status
docs: Check on the status of this particular file