@@ -97,6 +97,16 @@ class GlobPattern {
9797 bool
9898 matchPatternPrefix (std::string_view prefix, char delimiter) const ;
9999
100+ /* * Checks if the glob pattern is a literal string.
101+
102+ This function determines if the glob pattern does not contain
103+ any special characters. In other words, it matches a single string.
104+
105+ @return true if the glob pattern is a literal string, false otherwise.
106+ */
107+ bool
108+ isLiteral () const ;
109+
100110 /* * Returns the glob pattern.
101111
102112 @return The glob pattern as a string view.
@@ -185,6 +195,19 @@ class PathGlobPattern {
185195 return glob_.matchPatternPrefix (prefix, ' /' );
186196 }
187197
198+ /* * Checks if the glob pattern is a literal string.
199+
200+ This function determines if the glob pattern does not contain
201+ any special characters. In other words, it matches a single string.
202+
203+ @return true if the glob pattern is a literal string, false otherwise.
204+ */
205+ bool
206+ isLiteral () const
207+ {
208+ return glob_.isLiteral ();
209+ }
210+
188211 /* * Returns the glob pattern.
189212
190213 @return The glob pattern as a string view.
@@ -276,6 +299,19 @@ class SymbolGlobPattern {
276299 return glob_.matchPatternPrefix (prefix, ' :' );
277300 }
278301
302+ /* * Checks if the glob pattern is a literal string.
303+
304+ This function determines if the glob pattern does not contain
305+ any special characters. In other words, it matches a single string.
306+
307+ @return true if the glob pattern is a literal string, false otherwise.
308+ */
309+ bool
310+ isLiteral () const
311+ {
312+ return glob_.isLiteral ();
313+ }
314+
279315 /* * Returns the glob pattern.
280316
281317 @return The glob pattern as a string view.
0 commit comments