storeApiFile method

Future<void> storeApiFile(
  1. String repoPath,
  2. String ref,
  3. String content
)

Stores API documentation for a specific git ref

Implementation

Future<void> storeApiFile(String repoPath, String ref, String content) async {
  final repoCacheDir = getRepositoryCacheDir(repoPath);
  if (!repoCacheDir.existsSync()) {
    repoCacheDir.createSync(recursive: true);
  }

  final apiFile = getApiFileForRef(repoPath, ref);
  await apiFile.writeAsString(content);
}