MCPcopy Index your code
hub / github.com/JamieMason/ImageOptim-CLI / readFile

Function readFile

tasks/environment.js:8–15  ·  view source on GitHub ↗
(filePath, done)

Source from the content-addressed store, hash-verified

6 var path = require('path');
7
8 function readFile(filePath, done) {
9 fs.readFile(path.resolve(filePath), 'utf8', function(err, contents) {
10 if (err) {
11 throw err;
12 }
13 done(contents);
14 });
15 }
16
17 function writeFile(filePath, contents, done) {
18 fs.writeFile(path.resolve(filePath), contents, function(err) {

Callers 2

mergeObjectWithFileFunction · 0.85
environment.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected