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

Function deleteOldFiles

lib/tasks/defaults.js:168–173  ·  view source on GitHub ↗
(clientDir)

Source from the content-addressed store, hash-verified

166}
167
168function deleteOldFiles(clientDir) {
169 var filesDeleted = fs.readdirSync(clientDir).map(function(fileName) {
170 return fs.unlinkSync(path.join(clientDir, fileName));
171 });
172 return filesDeleted.length > 1 && log.info('✓'.green, '' + filesDeleted.length + ' previous packaged files deleted');
173}

Callers 1

defaults.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected