| | |
| | | } |
| | | |
| | | GlobSync.prototype._finish = function () { |
| | | assert(this instanceof GlobSync) |
| | | assert.ok(this instanceof GlobSync) |
| | | if (this.realpath) { |
| | | var self = this |
| | | this.matches.forEach(function (matchset, index) { |
| | |
| | | |
| | | |
| | | GlobSync.prototype._process = function (pattern, index, inGlobStar) { |
| | | assert(this instanceof GlobSync) |
| | | assert.ok(this instanceof GlobSync) |
| | | |
| | | // Get the first [n] parts of pattern that are all strings. |
| | | var n = 0 |
| | |
| | | var read |
| | | if (prefix === null) |
| | | read = '.' |
| | | else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { |
| | | else if (isAbsolute(prefix) || |
| | | isAbsolute(pattern.map(function (p) { |
| | | return typeof p === 'string' ? p : '[*]' |
| | | }).join('/'))) { |
| | | if (!prefix || !isAbsolute(prefix)) |
| | | prefix = '/' + prefix |
| | | read = prefix |