Reputation: 6723
With node.js globbing, I want to match some path, under any subdirectory. I hope my code example is clearer than my wording:
app/themes/*/images/icons/**/*.png
So, imagine the following:
app
|-- themes
| |-- theme1
| | `-- images
| | `-- icons
| | `-- home-icon.png
| `-- theme2
| `-- images
| `-- icons
| `-- home-icon.png
It should match both home-icon.png
s, in both theme1 and theme2.
Upvotes: 0
Views: 4482
Reputation: 7244
app/themes/*/images/icons/*.png
Code to try in Node console
var g = require('glob');
g('app/themes/*/images/icons/*.png', function (er, files) {
console.log(files);
});
Should list the files that match
Upvotes: 3