var fs = require('fs')2- Use the function readdir() from the fs variable
fs.readdir('c:/', (err, data) => { console.log(data) })
3- You will get a list of contents and directories within your C: drive
[ '$GetCurrent',
'$RECYCLE.BIN',
'Documents and Settings',
'Program Files',
'Program Files (x86)',
'ProgramData',
'Users',
'wamp64',
'Windows',
'Windows10Upgrade' ]
No comments:
Post a Comment