class_docstr: Watches a path on disk via a polling loop.
class_docstr_tok: ["Watches","a","path","on","disk","via","a","polling","loop","."]
code: def _check_if_path_changed(self) -> None:
      if not self._active:
          # Don't call self._schedule()
          return
  
      modification_time = util.path_modification_time(
          self._path, self._allow_nonexistent
      )
      # We add modification_time != 0.0 check since on some file systems (s3fs/fuse)
      # modification_time is always 0.0 because of file system limitations.
      if (
          modification_time != 0.0
          and modification_time <= self._modification_time
      ):
          self._schedule()
          return
  
      self._modification_time = modification_time
  
      md5 = util.calc_md5_with_blocking_retries(
          self._path,
          glob_pattern=self._glob_pattern,
          allow_nonexistent=self._allow_nonexistent,
      )
      if md5 == self._md5:
          self._schedule()
          return
  
      self._md5 = md5
  
      LOGGER.debug("Change detected: %s", self._path)
      self._on_changed(self._path)
  
      self._schedule()
  
file_path: streamlit/lib/streamlit/watcher/polling_path_watcher.py
imports: import time
  from concurrent.futures import ThreadPoolExecutor
  from typing import Callable, Optional
  from streamlit.logger import get_logger
  from streamlit.util import repr_
  from streamlit.watcher import util
label_desc: Use image node_id 5 for calling the PollingPathWatcher obj's underlying member method code with example usage: obj._check_if_path_changed() without return types