Software: Apache. PHP/8.3.27 uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364) Safe-mode: OFF (not secure) /usr/share/nodejs/fast-glob/out/tests/utils/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.info = exports.segment = void 0;
const utils = require("../../utils");
class PatternSegmentBuilder {
constructor() {
this._segment = {
dynamic: false,
pattern: ''
};
}
dynamic() {
this._segment.dynamic = true;
return this;
}
pattern(pattern) {
this._segment.pattern = pattern;
return this;
}
build(options = {}) {
if (!this._segment.dynamic) {
return this._segment;
}
return Object.assign(Object.assign({}, this._segment), { patternRe: utils.pattern.makeRe(this._segment.pattern, options) });
}
}
class PatternInfoBuilder {
constructor() {
this._section = {
complete: true,
pattern: '',
segments: [],
sections: []
};
}
section(...segments) {
this._section.sections.push(segments);
if (this._section.segments.length === 0) {
this._section.complete = true;
this._section.segments.push(...segments);
}
else {
this._section.complete = false;
const globstar = segment().dynamic().pattern('**').build();
this._section.segments.push(globstar, ...segments);
}
return this;
}
build() {
return Object.assign(Object.assign({}, this._section), { pattern: this._buildPattern() });
}
_buildPattern() {
return this._section.segments.map((segment) => segment.pattern).join('/');
}
}
function segment() {
return new PatternSegmentBuilder();
}
exports.segment = segment;
function info() {
return new PatternInfoBuilder();
}
exports.info = info;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0095 ]-- |