SHARE
TWEET

Untitled

a guest Oct 9th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2.  
  3. const fs = require('fs');
  4. const dir = './src/diff';
  5.  
  6. fs.readdir(dir, function(err, files){
  7.   if(err){
  8.     throw err;
  9.   }
  10.   files.forEach(function(file){
  11.     fs.unlink(`${dir}/${file}`, function(err){
  12.       if(err){
  13.         throw(err);
  14.       }
  15.       console.log(`deleted ${file}`);
  16.     });
  17.   });
  18. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top