What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-15 04:10:16
fs.readdirSync nodejs
The fs.readdirSync() method is used to synchronously read the contents of a given directory. The method returns an array with all the file names or objects in the directory. The options argument can be used to change the format in which the files are ret... Add solution -
Javascript 2021-11-05 03:23:10
Manually Parsing HTML in Node.js
/* This code comes from Vincent Lab And it has a video version linked here: https://www.youtube.com/watch?v=PozG7Sva270 */ // Import dependencies const fs = require("fs"); const cheerio = require("cheerio"); const cheerioTable... Add solution -
Javascript 2021-10-25 05:24:11
Manually Parsing PDF in Node.js
/* This code comes from Vincent Lab And it has a video version linked here: https://www.youtube.com/watch?v=b2dLDqmYT4I */ // Import dependencies const fs = require("fs"); const PDFParser = require("pdf2json"); // Get all the... Add solution -
Javascript 2021-10-16 18:07:05
delete all files in a folder with nodejs
rmDir = function(dirPath, removeSelf) { try { var files = fs.readdirSync(dirPath); } catch(e) { return; } if (files.length > 0) for (var i = 0; i < files.length; i++) { var filePath = dirPath + '/' + files[i]; if (fs.statSync(f... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5