directory cleanup on startup

This commit is contained in:
Jan Prochazka
2020-11-07 17:54:43 +01:00
parent 307aaa2801
commit c65806fd89
4 changed files with 37 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
const findRemoveSync = require('find-remove');
function cleanDirectory(directory) {
findRemoveSync(directory, {
age: { seconds: 3600 },
files: '*.*',
dir: '*',
});
}
module.exports = cleanDirectory;