File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ vector<filesystem::path> rglob(vector<string> pathnames);
76
76
77
77
## Example
78
78
79
- Below is a short program that runs ` glob ` and prints the matches .
79
+ Below is a short program that runs ` glob ` and prints matching path names .
80
80
81
81
*** NOTE*** Replace ` glob ` with ` rglob ` if you want to glob recursively.
82
82
@@ -90,6 +90,7 @@ int main(int argc, char *argv[]) {
90
90
return EXIT_FAILURE;
91
91
}
92
92
93
+ // Run glob on the vector of patterns
93
94
for (auto &f : glob::glob(argv[ 1] )) {
94
95
std::cout << f << "\n";
95
96
}
@@ -219,3 +220,20 @@ foo@bar:~$ ./main 'test_files_03/????[3-4].txt'
219
220
"test_files_03/file3.txt"
220
221
"test_files_03/file4.txt"
221
222
```
223
+
224
+ ### Case sensitivity
225
+
226
+ ` glob ` matching is case-sensitive:
227
+
228
+ ``` console
229
+ foo@bar:~ $ ls test_files_05
230
+ file1.png file2.png file3.PNG file4.PNG
231
+
232
+ foo@bar:~ $ ./main ' test_files_05/*.png'
233
+ "test_files_05/file2.png"
234
+ "test_files_05/file1.png"
235
+
236
+ foo@bar:~ $ ./main ' test_files_05/*.PNG'
237
+ "test_files_05/file3.PNG"
238
+ "test_files_05/file4.PNG"
239
+ ```
You can’t perform that action at this time.
0 commit comments