anchor.diff:              'encountered $resourcePath');
         }
         String destFileName = resourcePath.substring(prefix.length);
  -      File destFile =
  -          new File(path.join(out.path, 'static-assets', destFileName))
  -            ..createSync(recursive: true);
  -      Uint8List resourceBytes = await loader.loadAsBytes(resourcePath);
  -      destFile.writeAsBytesSync(resourceBytes);
  +      _writeFile(path.join(out.path, 'static-assets', destFileName),
  +          await loader.loadAsBytes(resourcePath));
       }
     }
   
  
positive.code: 
      await _copyResources();
      if (faviconPath != null) {
        File file = new File(path.join(out.path, 'static-assets', 'favicon.png'));
        file.writeAsBytesSync(new File(faviconPath).readAsBytesSync());
      }
    }
  
  
negative.code:     String content = template(data,
          assumeNullNonExistingProperty: false, errorOnMissingProperty: true);
  
      _writeFile(fullName, content);
      if (data.self is ModelElement) documentedElements.add(data.self);
    }
  
    /// [content] must be either [String] or [List<int>].
    void _writeFile(String filename, Object content) {
      // If you see this assert, we're probably being called to build non-canonical
      // docs somehow.  Check data.self.isCanonical and callers for bugs.
      assert(!writtenFiles.contains(filename));
  
      File file = new File(filename);
      Directory parent = file.parent;
      if (!parent.existsSync()) {
        parent.createSync(recursive: true);
      }
  
      if (content is String) {
        file.writeAsStringSync(content);
      } else if (content is List<int>) {
        file.writeAsBytesSync(content);
      } else {
        throw new ArgumentError.value(
            content, 'content', '`content` must be `String` or `List<int>`.');
      }
      _onFileCreated.add(file);
      writtenFiles.add(filename);
    }
  }
  