How to use the readFile function from graceful-fs
Find comprehensive JavaScript graceful-fs.readFile code examples handpicked from public code repositorys.
79 80 81 82 83 84 85 86 87 88
} var client = this fs.stat(cachePath, function (er, stat) { if (!er) { fs.readFile(cachePath, function (er, data) { data = parseJSON.noExceptions(data) params.stat = stat params.data = data
0
1
1
+ 14 other calls in file
GitHub: Jokerfive7/-Duelyst-
70 71 72 73 74 75 76 77 78 79
var which = npm.config.get('global') ? 'global' : 'user' var f = npm.config.get(which + 'config') if (!e) return cb(new Error('No EDITOR config or environ set.')) npm.config.save(which, function (er) { if (er) return cb(er) fs.readFile(f, 'utf8', function (er, data) { if (er) data = '' data = [ ';;;;', '; npm ' + (npm.config.get('global')
0
1
1
+ 2 other calls in file
60 61 62 63 64 65 66 67 68 69
// verify file exists already assert(fs.existsSync(dest)) fse.move(src, dest, { overwrite: true }, err => { assert.ifError(err) fs.readFile(dest, 'utf8', (err, contents) => { const expected = /^sonic the hedgehog\r?\n$/ assert.ifError(err) assert.ok(contents.match(expected)) done()
802
0
91
+ 19 other calls in file
graceful-fs.promises is the most popular function in graceful-fs (1135 examples)