Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.bachtale.com_1719306535
/
htdocs
/
node_modules
/
cosmiconfig
/
dist
/
//srv/data/trash/vhost_www.bachtale.com_1719306535/htdocs/node_modules/cosmiconfig/dist/readFile.js
// 'use strict'; const fs = require('fs'); function readFile(filepath , options ) { options = options || {}; const throwNotFound = options.throwNotFound || false; return new Promise((resolve, reject) => { fs.readFile(filepath, 'utf8', (err, content) => { if (err && err.code === 'ENOENT' && !throwNotFound) { return resolve(null); } if (err) return reject(err); resolve(content); }); }); } readFile.sync = function readFileSync( filepath , options ) { options = options || {}; const throwNotFound = options.throwNotFound || false; try { return fs.readFileSync(filepath, 'utf8'); } catch (err) { if (err.code === 'ENOENT' && !throwNotFound) { return null; } throw err; } }; module.exports = readFile;