docs: def sync(self):
          """ Synchronize will try to synchronize two directories w.r.t
          each other's contents, copying files if necessary from source
          to target, and creating directories if necessary. If the optional
          argument purge is True, directories in target (dir2) that are
          not present in the source (dir1) will be deleted . Synchronization
          is done in the direction of source to target """
  
          self._copyfiles = True
          self._updatefiles = True
          self._creatdirs = True
          self._copydirection = 0
  
          if self._verbose:
              self.log('Synchronizing directory %s with %s\n' %
                       (self._dir2, self._dir1))
          self._dirdiffcopyandupdate(self._dir1, self._dir2)