anchor.diff:  /// a symlink only if that symlink is unbroken and points to a directory.
   bool dirExists(String dir) => new Directory(dir).existsSync();
   
  +/// Try to resiliently perform [operation].
  +///
  +/// Some file system operations can intermittently fail on Windows because
  +/// other processes are locking a file. We've seen this with virus scanners
  +/// when we try to delete or move something while it's being scanned. To
  +/// mitigate that, on Windows, this will retry the operation a few times if it
  +/// fails.
  +void _attempt(String description, void operation()) {
  +  if (Platform.operatingSystem != 'windows') {
  +    operation();
  +    return;
  +  }
  +
  +  getErrorReason(error) {
  +    if (error.osError.errorCode == 5) {
  +      return "access was denied";
  +    }
  +
  +    if (error.osError.errorCode == 32) {
  +      return "it was in use by another process";
  +    }
  +
  +    return null;
  +  }
  +
  +  for (var i = 0; i < 2; i++) {
  +    try {
  +      operation();
  +      return;
  +    } on FileSystemException catch (error) {
  +      var reason = getErrorReason(error);
  +      if (reason == null) rethrow;
  +
  +      log.io("Failed to $description because $reason. "
  +          "Retrying in 50ms.");
  +      sleep(new Duration(milliseconds: 50));
  +    }
  +  }
  +
  +  try {
  +    operation();
  +  } on FileSystemException catch (error) {
  +    var reason = getErrorReason(error);
  +    if (reason == null) rethrow;
  +
  +    fail("Failed to $description because $reason.\n"
  +        "This may be caused by a virus scanner or having a file\n"
  +        "in the directory open in another application.");
  +  }
  +}
  +
   /// Deletes whatever's at [path], whether it's a file, directory, or symlink. If
   /// it's a directory, it will be deleted recursively.
   void deleteEntry(String path) {
  -  tryDeleteEntry() {
  +  _attempt("delete entry", () {
       if (linkExists(path)) {
         log.io("Deleting link $path.");
         new Link(path).deleteSync();
  
positive.code: 
  /// Renames (i.e. moves) the directory [from] to [to].
  void renameDir(String from, String to) {
    log.io("Renaming directory $from to $to.");
    try {
      new Directory(from).renameSync(to);
    } on IOException catch (error) {
      // Ensure that [to] isn't left in an inconsistent state. See issue 12436.
      if (entryExists(to)) deleteEntry(to);
      rethrow;
    }
  }
  
  /// Creates a new symlink at path [symlink] that points to [target]. Returns a
  
negative.code:       log.io("Deleting file $path.");
        new File(path).deleteSync();
      }
    });
  }
  
  /// "Cleans" [dir]. If that directory already exists, it will be deleted. Then a
  