Exemple #1
0
        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()));
        }
Exemple #2
0
        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()));
        }