Example #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 () {
Example #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... FUCK!
     //or that does not delete everything as wrench-js used
     //below... FUCK as well
     //wrench.rmdirRecursive(folderPath, function(err){
     //    if(err) throw err;
         pfs.unlink(req.files.upload.path).then(res.redirect('/'));
     //});
 });
Example #3
0
 User.findByIdAndUpdate(req.user._id, { $push: {slides : newSlideshow._id } }, function(err, user) {
     pfs.unlink(req.files.upload.path).then(res.redirect('/user/'));
 });
Example #4
0
 function() {
     if (result[2]) pfs.unlink(folderPath + '/questions.json');
 },
Example #5
0
 function() {
     if (result[1]) pfs.unlink(folderPath + '/assets.json');
 },