void _validateIntermediateChildrenSync()

in lib/src/list_tree.dart [472:490]


  void _validateIntermediateChildrenSync(
      String dir, List<FileSystemEntity> entities, FileSystem fileSystem) {
    if (_caseSensitive) return;

    children!.forEach((sequence, child) {
      if (!child._isIntermediate) return;
      if (entities.any(
          (entity) => sequence.matches(p.relative(entity.path, from: dir)))) {
        return;
      }

      // If there are no [entities] that match [sequence], manually list the
      // directory to force `dart:io` to throw an error. This allows us to
      // ensure that listing "foo/bar/*" fails on case-sensitive systems if
      // "foo/bar" doesn't exist.
      child.listSync(
          p.join(dir, (sequence.nodes.single as LiteralNode).text), fileSystem);
    });
  }