File tree 1 file changed +20
-0
lines changed 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
- [ Quick Start] ( #quick-start )
12
12
* [ Build Library and Standalone Sample] ( #build-library-and-standalone-sample )
13
+ - [ Usage] ( #usage )
13
14
- [ API] ( #api )
14
15
- [ Wildcards] ( #wildcards )
15
16
- [ Examples] ( #examples )
@@ -40,6 +41,25 @@ cmake --build build
40
41
./build/standalone/glob --help
41
42
```
42
43
44
+ ### Usage
45
+
46
+ ``` cpp
47
+ // Match on a single pattern
48
+ for (auto & p : glob::glob(" *.png" )) {
49
+ // do something with ` p `
50
+ }
51
+
52
+ // Match on multiple patterns
53
+ for (auto & p : glob::glob({"* .png", "* .jpg"})) {
54
+ // do something with ` p `
55
+ }
56
+
57
+ // Match recursively
58
+ for (auto & p : glob::rglob(" **/*.hpp" )) {
59
+ // do something with ` p `
60
+ }
61
+ ```
62
+
43
63
## API
44
64
45
65
* No tilde expansion is done but ` * ` , ` ? ` , and character ranges expressed with ` [] ` will be correctly matched.
You can’t perform that action at this time.
0 commit comments