pattern function

PatternDescriptor pattern(
  1. Pattern name,
  2. Descriptor child(
    1. String basename
    )
)

Creates a new PatternDescriptor descriptor that asserts than an entry with a name matching pattern exists, and matches the Descriptor returned by child.

The child callback is passed the basename of each entry matching name. It returns a descriptor that should match that entry. It's valid for multiple entries to match name as long as only one of them matches child.

Descriptor.create is not supported for this descriptor.

Implementation

PatternDescriptor pattern(
        Pattern name, Descriptor Function(String basename) child) =>
    PatternDescriptor(name, child);