What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-29 12:13:11
javascript shell
just a simple script for javascript shell const fs = require('fs'); function buildTree(startPath) { fs.readdir(startPath, (err, entries) => { console.log(entries); }); } buildTree('/home/jim/Desktop/theme'); for extra info visit below link h... 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 -
C 2021-09-10 19:47:04
npm fs zip
import * as fs from 'fs-zip' // Zip operationsfs.readdir('/home/user/Documents/test.zip/subdir') .then(res => console.log(res)) fs.readFile('/home/user/Documents/test.zip/sub... Add solution