validate method

  1. @override
Future<void> validate([
  1. String? parent
])
override

Validates that the physical file system under parent (which defaults to sandbox) contains an entry that matches this descriptor.

Implementation

@override
Future<void> validate([String? parent]) async {
  var fullPath = p.join(parent ?? sandbox, name);
  var pretty = prettyPath(fullPath);
  if (!(await File(fullPath).exists())) {
    fail('File not found: "$pretty".');
  }

  await _validate(pretty, await File(fullPath).readAsBytes());
}