class_docstr: FSHandler detects file created and modified events.
  
  Updates to input files are sent to the Rebuilder.
  
  Updates to output files are sent to the LongPoller.
class_docstr_tok: ["FSHandler","detects","file","created","and","modified","events",".","Updates","to","input","files","are","sent","to","the","Rebuilder",".","Updates","to","output","files","are","sent","to","the","LongPoller","."]
code: def handle(self, event):
      if event.is_directory:
          return
      # Watchdog gives differently-styled src_paths on mac vs linux, so convert to relative path.
      path = os.path.relpath(event.src_path, ".")
      if path.startswith("site/"):
          if path.endswith(".html"):
              self.long_poller.update(path)
              return
      elif path.endswith(".rst") or path.startswith("assets/"):
          self.rebuilder.handle_input_update()
  
imports: import http.server
  import os
  import subprocess
  import sys
  import threading
  import time
  import watchdog
  import watchdog.events
  import watchdog.observers
label_desc: Use image node_id 4 for calling the FSHandler obj's underlying member method code with example usage: obj.handle(event) without return types