| //requiring path and fs modules | |
| const path = require('path'); | |
| const fs = require('fs'); | |
| //joining path of directory | |
| const directoryPath = path.join(__dirname, 'Documents'); | |
| //passsing directoryPath and callback function | |
| fs.readdir(directoryPath, function (err, files) { | |
| //handling error | |
| if (err) { | |
| return console.log('Unable to scan directory: ' + err); | |
| } | |
| //listing all files using forEach | |
| files.forEach(function (file) { | |
| // Do whatever you want to do with the file | |
| console.log(file); | |
| }); | |
| }); | 
Get List of all files in a directory in Node.js
https://medium.com/stackfame/get-list-of-all-files-in-a-directory-in-node-js-befd31677ec5
Đăng ký:
Đăng Nhận xét (Atom)
‘Connection lost’ / ‘Invalid origin!’ Error with n8n >= 1.87.0 behind Cloudflare Tunnel
https://community.n8n.io/t/solved-connection-lost-invalid-origin-error-with-n8n-1-87-0-behind-cloudflare-tunnel/99913/1 The Solution: The ...
- 
Basic usage | Documentation | Poetry - Python dependency management and packaging made easy (python-poetry.org) Activating the virtual env...
- 
letsencrypt "Certbot doesn't know how to automatically configure the web server on this system" (repusic.com) sudo yum inst...
- 
https://medium.com/@mair.swartz/creating-xml-document-with-react-c6c37f5c608b I wanted to see if React could be used to compose anything mo...
 
Không có nhận xét nào:
Đăng nhận xét