All permission pattern matching flows through a single function: [Wildcard.match()][wildcard-match].
The conversion steps are:
- Normalize backslashes —
\→/on both input and pattern ([lines 5–6][wildcard-match]) - Escape all regex metacharacters —
.+^${}()|[]\are escaped so they match literally ([line 8][wildcard-match])