MCPcopy Index your code
hub / github.com/acode/cli / writeFiles

Function writeFiles

cli/fileio.js:31–44  ·  view source on GitHub ↗
(directory, files)

Source from the content-addressed store, hash-verified

29}
30
31function writeFiles(directory, files) {
32
33 Object.keys(files)
34 .reduce((dirs, pathname) => {
35 // Makes sure templates work with new directory names
36 let writePath = pathname;
37 let unused = `${unusedFunctionDir}/`;
38 if (pathname.substr(0, unused.length) === unused) {
39 writePath = `${functionDir}/${pathname.substr(unused.length)}`;
40 }
41 return writeFile(directory, writePath, files[pathname], dirs);
42 }, {});
43
44}
45
46function readFiles(basepath, pathname, files, condenseDots) {
47 basepath = basepath || '.';

Callers 1

fileio.jsFile · 0.85

Calls 1

writeFileFunction · 0.85

Tested by

no test coverage detected