manifestEntryForFile method

Future<ManifestEntry> manifestEntryForFile(
  1. String baseDir,
  2. String relativePath
)

Computes a manifest entry for the file at baseDir/relativePath.

Implementation

Future<ManifestEntry> manifestEntryForFile(
  String baseDir,
  String relativePath,
) async {
  validateManifestPath(relativePath);
  final d = ContentDigester(ctx);
  await File(_join(baseDir, relativePath)).openRead().forEach(d.add);
  return ManifestEntry(relativePath, d.length, d.close());
}