![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/clinic.corals.io/node_modules/cosmiconfig/dist/ |
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.readFile = readFile; exports.readFileSync = readFileSync; var _fs = _interopRequireDefault(require("fs")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } async function fsReadFileAsync(pathname, encoding) { return new Promise((resolve, reject) => { _fs.default.readFile(pathname, encoding, (error, contents) => { if (error) { reject(error); return; } resolve(contents); }); }); } async function readFile(filepath, options = {}) { const throwNotFound = options.throwNotFound === true; try { const content = await fsReadFileAsync(filepath, 'utf8'); return content; } catch (error) { if (throwNotFound === false && error.code === 'ENOENT') { return null; } throw error; } } function readFileSync(filepath, options = {}) { const throwNotFound = options.throwNotFound === true; try { const content = _fs.default.readFileSync(filepath, 'utf8'); return content; } catch (error) { if (throwNotFound === false && error.code === 'ENOENT') { return null; } throw error; } } //# sourceMappingURL=readFile.js.map