source: trip-planner-front/node_modules/@nodelib/fs.scandir/out/settings.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const path = require("path");
4const fsStat = require("@nodelib/fs.stat");
5const fs = require("./adapters/fs");
6class Settings {
7 constructor(_options = {}) {
8 this._options = _options;
9 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
10 this.fs = fs.createFileSystemAdapter(this._options.fs);
11 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
12 this.stats = this._getValue(this._options.stats, false);
13 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
14 this.fsStatSettings = new fsStat.Settings({
15 followSymbolicLink: this.followSymbolicLinks,
16 fs: this.fs,
17 throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
18 });
19 }
20 _getValue(option, value) {
21 return option !== null && option !== void 0 ? option : value;
22 }
23}
24exports.default = Settings;
Note: See TracBrowser for help on using the repository browser.