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);
  if (!(await Directory(fullPath).exists())) {
    fail('Directory not found: "${prettyPath(fullPath)}".');
  }

  await waitAndReportErrors(
      contents.map((entry) => entry.validate(fullPath)));
}