code: def commit(self):
          
          assert self.record
          result = self.files_written, self.dirs_created
          self._init_record()
          return result
docs: Commit recorded changes, turn off recording, return
          changes.