Future _processEntity()

in packages/code_excerpt_updater/lib/code_excerpt_updater_cli.dart [187:201]


  Future<void> _processEntity(String path,
      {bool warnAboutNonDartFile = false}) async {
    final type = await FileSystemEntity.type(path);
    switch (type) {
      case FileSystemEntityType.directory:
        return _processDirectory(path);
      case FileSystemEntityType.file:
        if (_validExt.hasMatch(path)) return _processFile(path);
    }
    if (warnAboutNonDartFile) {
      final kind =
          type == FileSystemEntityType.notFound ? 'existent' : 'Dart/Markdown';
      stderr.writeln('Warning: skipping non-$kind file "$path" ($type)');
    }
  }