A glob pattern resolver for RingoJS
This module uses the fnmatch module for glob pattern conversion, and thus supports all of its glob pattern features.
var glob = require("glob");
var paths = glob("./**/*.js");
console.dir(paths);dot(default: false):globby default doesn't match files or directories whose name contains a leading dot. This changes if this option is set totrue.globstar(default: true): if false**doesn't traverse across directory boundaries, instead it's interpreted as two*wildcardsignore: A single glob pattern or an array of patterns to be ignored, i.e. all resolved paths matching this option will be excluded from the result.
The result returned by glob is always an array. If the pattern can't be resolved,
glob returns an empty array. All paths returned are sorted in the way the
default Array.sort()
behaves.
globas of now doesn't follow symlinksglobdoesn't have anignoreCaseoption because the internally usedjava.io.Filedoesn't have one. So it entirely relies on the case (in-)sensitivity of the underlying operating system.- Any glob pattern negation (leading
!) is ignored. Use theignoreoption instead.
glob expects all patterns to be forward slash (/) separated, and will return
all paths using the forward slash as separator. These paths can be used directly
(eg. by utilizing the standard RingoJS fs module).