def _watch_file(self, filepath, trigger_event=True):
        is_new = filepath not in self._watched_files
        if trigger_event:
            if is_new:
                self.trigger_created(filepath)
            else:
                self.trigger_modified(filepath)
        try:
            self._watched_files[filepath] = self._get_modified_time(filepath)
        except OSError:
            return  # didn't happen
Adds the file's modified time into its internal watchlist.
dataset/ETHPy150Open jeffh/sniffer/sniffer/scanner/base.py/PollingScanner._watch_file