MCPcopy Index your code
hub / github.com/danthareja/node-google-apps-script / writeExternalFile

Function writeExternalFile

lib/commands/init.js:47–54  ·  view source on GitHub ↗
(file, dir)

Source from the content-addressed store, hash-verified

45};
46
47function writeExternalFile(file, dir) {
48 var filename = file.name + util.getFileExtension(file)
49 return fs.writeFileAsync(dir + '/' + filename, file.source)
50 .catch(function(err) {
51 console.log('Could not write file ' + filename);
52 throw err;
53 })
54}
55
56function fileIdIsValid(fileId) {
57 if(fileId.charAt(0).toLowerCase() === 'm') {

Callers 1

init.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected