1
|
{"version":3,"sources":["../../../src/php/filesystem/file_get_contents.js"],"names":["module","exports","file_get_contents","url","flags","context","offset","maxLen","fs","require","readFileSync"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,iBAAT,CAA4BC,GAA5B,EAAiCC,KAAjC,EAAwCC,OAAxC,EAAiDC,MAAjD,EAAyDC,MAAzD,EAAiE;AAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,KAAKC,QAAQ,IAAR,CAAT;;AAEA,SAAOD,GAAGE,YAAH,CAAgBP,GAAhB,EAAqB,OAArB,CAAP;AACD,CArBD","file":"file_get_contents.js","sourcesContent":["module.exports = function file_get_contents (url, flags, context, offset, maxLen) { // eslint-disable-line camelcase\n // discuss at: http://locutus.io/php/file_get_contents/\n // original by: Legaev Andrey\n // input by: Jani Hartikainen\n // input by: Raphael (Ao) RUDLER\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // reimplemented by: Kevin van Zonneveld (http://kvz.io)\n // note 1: This used to work in the browser via blocking ajax\n // note 1: requests in 1.3.2 and earlier\n // note 1: but then people started using that for real app,\n // note 1: so we deprecated this behavior,\n // note 1: so this function is now Node-only\n // example 1: var $buf = file_get_contents('test/never-change.txt')\n // example 1: var $result = $buf.indexOf('hash') !== -1\n // returns 1: true\n\n var fs = require('fs')\n\n return fs.readFileSync(url, 'utf-8')\n}\n"]}
|