public static Glob Parse(string pattern) { if (string.IsNullOrEmpty(pattern)) { throw new ArgumentNullException(pattern); } var tokeniser = new GlobTokeniser(); var tokens = tokeniser.Tokenise(pattern); return(new Glob(tokens.ToArray())); }
public static Glob Parse(string pattern, GlobParseOptions options) { if (string.IsNullOrEmpty(pattern)) { throw new ArgumentNullException(pattern); } var tokeniser = new GlobTokeniser(); var tokens = tokeniser.Tokenise(pattern, options.AllowInvalidPathCharacters); return(new Glob(tokens.ToArray())); }