זה נושא דיון מלווה לערך המקורי ב- https://www.tocode.co.il/bundles/nodejs/lessons/10-filesystem
זה נושא דיון מלווה לערך המקורי ב- https://www.tocode.co.il/bundles/nodejs/lessons/10-filesystem
בסעיף 2.2 יש לך טעות
כתבת
const fs = require('fs');
console.log(__filename);
['./logs', './doc/html'].forEach(path => {
fs.mkdir('./logs', { recursive: true }, (err) => {
if (err) throw err;
console.log(`${path} folder is ready`);
});
});
צריך לכתוב
const fs = require('fs');
console.log(__filename);
['./logs', './doc/html'].forEach(path => {
fs.mkdir(path, { recursive: true }, (err) => {
if (err) throw err;
console.log(`${path} folder is ready`);
});
});
לייק 1