heavyScanGuardIfHeavy function

Future<List<String>> heavyScanGuardIfHeavy(
  1. FileSystem fs,
  2. String path
)

The heavyScanGuardLines for path when it is over the warn bound, else empty — the shared shape the resume line, the REPL trajectory guard and the headless dispatcher print.

Implementation

Future<List<String>> heavyScanGuardIfHeavy(FileSystem fs, String path) async {
  final heavy = await sessionSizeIfHeavy(fs, path);
  if (heavy == null) return const [];
  return heavyScanGuardLines(heavy, path);
}