Permalink
Cannot retrieve contributors at this time
26 lines (26 sloc)
1009 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/@nodelib/fs.scandir/out/index.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.Settings = exports.scandirSync = exports.scandir = void 0; | |
const async = require("./providers/async"); | |
const sync = require("./providers/sync"); | |
const settings_1 = require("./settings"); | |
exports.Settings = settings_1.default; | |
function scandir(path, optionsOrSettingsOrCallback, callback) { | |
if (typeof optionsOrSettingsOrCallback === 'function') { | |
async.read(path, getSettings(), optionsOrSettingsOrCallback); | |
return; | |
} | |
async.read(path, getSettings(optionsOrSettingsOrCallback), callback); | |
} | |
exports.scandir = scandir; | |
function scandirSync(path, optionsOrSettings) { | |
const settings = getSettings(optionsOrSettings); | |
return sync.read(path, settings); | |
} | |
exports.scandirSync = scandirSync; | |
function getSettings(settingsOrOptions = {}) { | |
if (settingsOrOptions instanceof settings_1.default) { | |
return settingsOrOptions; | |
} | |
return new settings_1.default(settingsOrOptions); | |
} |