
  2) if 'name' is a directory in both the dirs are searched recursively.
  3) if 'name' is a dir in root1 and a file in root2 (or vice-versa)
     synchronization cannot proceed (an error is thrown).
 If 'name' is found only in root1 or root2 it's a difference between them.

 The parameter flag controls how synchronization occurs:
  flag==0: neither tree1 nor tree2 has preference (newer file is kept)
  flag==1: tree2 is altered to reflect tree1 (tree1 is unchanged)
  flag==2: tree1 is altered to re