MCPcopy Index your code
hub / github.com/socketstream/socketstream / makeRootDirectory

Function makeRootDirectory

lib/cli/generate.js:23–35  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

21 // TODO - investigate whether this would be better
22 // using the async version of fs.mkdir - PJENSEN
23 makeRootDirectory = function (name) {
24 try {
25 fs.mkdirSync(name, dir_mode); // Create the root directory
26 return true;
27 } catch (e) {
28 if (e.code === 'EEXIST') {
29 log('Sorry the \'' + name + '\' directory already exists. Please choose another name for your app.');
30 return false;
31 } else {
32 throw e;
33 }
34 }
35 };
36
37exports.generate = function(program) {
38

Callers 1

generate.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected