MCPcopy
hub / github.com/foreversd/forever / getSockets

Function getSockets

lib/forever.js:89–106  ·  view source on GitHub ↗
(sockPath, callback)

Source from the content-addressed store, hash-verified

87// then it is created using `mkdirp`.
88//
89function getSockets(sockPath, callback) {
90 let sockets;
91
92 try {
93 sockets = fs.readdirSync(sockPath);
94 }
95 catch (ex) {
96 if (ex.code !== 'ENOENT') {
97 return callback(ex);
98 }
99
100 return mkdirp(sockPath, '0755', function (err) {
101 return err ? callback(err) : callback(null, []);
102 });
103 }
104
105 callback(null, sockets);
106}
107
108//
109// ### function getAllProcess (callback)

Callers 1

getAllProcessesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected