toGlobPattern method

String toGlobPattern()

Implementation

String toGlobPattern() {
  String result = this;
  for (final element in globRegExpReplaces) {
    result = result.replaceAllMapped(element.from, element.replace);
  }
  {
    final List<String> results = result.split("/");
    if (results.length == 1) {
      return "^${result}\$";
    }
  }
  return result;
}