UNPKG

1.12 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Settings = void 0;
4const path = require("node:path");
5const fsScandir = require("@nodelib/fs.scandir");
6class Settings {
7 basePath;
8 concurrency;
9 deepFilter;
10 entryFilter;
11 errorFilter;
12 pathSegmentSeparator;
13 fsScandirSettings;
14 constructor(options = {}) {
15 this.basePath = options.basePath ?? undefined;
16 this.concurrency = options.concurrency ?? Number.POSITIVE_INFINITY;
17 this.deepFilter = options.deepFilter ?? null;
18 this.entryFilter = options.entryFilter ?? null;
19 this.errorFilter = options.errorFilter ?? null;
20 this.pathSegmentSeparator = options.pathSegmentSeparator ?? path.sep;
21 this.fsScandirSettings = new fsScandir.Settings({
22 followSymbolicLinks: options.followSymbolicLinks,
23 fs: options.fs,
24 pathSegmentSeparator: this.pathSegmentSeparator,
25 stats: options.stats,
26 throwErrorOnBrokenSymbolicLink: options.throwErrorOnBrokenSymbolicLink,
27 });
28 }
29}
30exports.Settings = Settings;