Beispiel #1
0
      return promise.all(paths.files.map(function (filePath) {
        logger.writeln('Unlinking ' + filePath.cyan + ' because it was removed from src.');

        if (justPretend) {
          return;
        }
        return fs.unlink(filePath);
      })).then(function () {
Beispiel #2
0
 function() {
     console.log('something went wrong');
     //TODO: Find a module to remove the (not empty) directory
     //with the invalid slides without throwing an error becasue
     //it deleted what it was suppose to delete... F**K!
     //or that does not delete everything as wrench-js used
     //below... F**K as well
     //wrench.rmdirRecursive(folderPath, function(err){
     //    if(err) throw err;
         pfs.unlink(req.files.upload.path).then(res.redirect('/'));
     //});
 });
Beispiel #3
0
 User.findByIdAndUpdate(req.user._id, { $push: {slides : newSlideshow._id } }, function(err, user) {
     pfs.unlink(req.files.upload.path).then(res.redirect('/user/'));
 });
Beispiel #4
0
 function() {
     if (result[2]) pfs.unlink(folderPath + '/questions.json');
 },
Beispiel #5
0
 function() {
     if (result[1]) pfs.unlink(folderPath + '/assets.json');
 },