code: def diff(self, path_a, path_b):
          
          path_a = path_a.rstrip("/")
          path_b = path_b.rstrip("/")
  
          if not self.exists(path_a) or not self.exists(path_b):
              return
  
          if not self.equal(path_a, path_b):
              yield 0, "/"
  
          seen = set()
  
          len_a = len(path_a)
          len_b = len(path_b)
  
          # first, check what's missing & changed in dst
          for child_a, level in self.tree(path_a, 0, True):
              child_sub = child_a[len_a + 1:]
              child_b = os.path.join(path_b, child_sub)
  
              if not self.exists(child_b):
                  yield -1, child_sub
              else:
                  if not self.equal(child_a, child_b):
                      yield 0, child_sub
  
              seen.add(child_sub)
  
          # now, check what's new in dst
          for child_b, level in self.tree(path_b, 0, True):
              child_sub = child_b[len_b + 1:]
              if child_sub not in seen:
                  yield 1, child_sub
docs: Performs a deep comparison of path_a/ and path_b/
  
              For each child, it yields (rv, child) where rv:
               -1 if doesn't exist in path_b (destination)
                0 if they are different
                1 if it doesn't exist in path_a (source)