Future _validateIntermediateChildrenAsync()

in lib/src/list_tree.dart [382:402]


  Future _validateIntermediateChildrenAsync(String dir,
      List<FileSystemEntity> entities, FileSystem fileSystem) async {
    if (_caseSensitive) return;

    for (var entry in children!.entries) {
      var child = entry.value;
      var sequence = entry.key;
      if (!child._isIntermediate) continue;
      if (entities.any(
          (entity) => sequence.matches(p.relative(entity.path, from: dir)))) {
        continue;
      }

      // We know this will fail, we're just doing it to force dart:io to emit
      // the exception it would if we were listing case-sensitively.
      await child
          .list(p.join(dir, (sequence.nodes.single as LiteralNode).text),
              fileSystem)
          .toList();
    }
  }