validateDataAssetLinkConfig function

Future<ValidationErrors> validateDataAssetLinkConfig(
  1. LinkConfig config
)

Implementation

Future<ValidationErrors> validateDataAssetLinkConfig(LinkConfig config) async {
  final errors = <String>[];
  for (final asset in config.dataAssets) {
    if (!File.fromUri(asset.file).existsSync()) {
      errors.add('LinkConfig.dataAssets contained asset ${asset.id} with file '
          '(${asset.file}) which does not exist.');
    }
  }
  return errors;
}