1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.Settings = void 0;
|
4 | const path = require("node:path");
|
5 | const fsStat = require("@nodelib/fs.stat");
|
6 | const fs = require("./adapters/fs");
|
7 | class Settings {
|
8 | followSymbolicLinks;
|
9 | fs;
|
10 | pathSegmentSeparator;
|
11 | stats;
|
12 | throwErrorOnBrokenSymbolicLink;
|
13 | fsStatSettings;
|
14 | constructor(options = {}) {
|
15 | this.followSymbolicLinks = options.followSymbolicLinks ?? false;
|
16 | this.fs = fs.createFileSystemAdapter(options.fs);
|
17 | this.pathSegmentSeparator = options.pathSegmentSeparator ?? path.sep;
|
18 | this.stats = options.stats ?? false;
|
19 | this.throwErrorOnBrokenSymbolicLink = options.throwErrorOnBrokenSymbolicLink ?? true;
|
20 | this.fsStatSettings = new fsStat.Settings({
|
21 | followSymbolicLink: this.followSymbolicLinks,
|
22 | fs: this.fs,
|
23 | throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink,
|
24 | });
|
25 | }
|
26 | }
|
27 | exports.Settings = Settings;
|