Course Solutions Uncategorized (Solved) : Nodejs Questionplease Modify Following Code Question File Size Larger 1 Byte Please Extrac Q29768461 . . . .

(Solved) : Nodejs Questionplease Modify Following Code Question File Size Larger 1 Byte Please Extrac Q29768461 . . . .

 

This is the node.js question.Please modify the followingcode.

Question:If the file size is larger than 1 byte, please extractthe file including directory and put the file including directoryto another directory.(the directory structure is completelyunchanged.

Source code:

//src as reference, dist as distenation
const COPY_SRC = ‘./Source’;
const COPY_DIST = ‘./Dist’;

//Copy the Source directory to the Dist directory
const fs = require(‘fs-extra’);
const path = require(‘path’);

//get the list of the all files
fs.readdir(‘.’, function (err, files) {
if (err) {
console.error(err);
} else {
console.log(files);
}
});

// enumerate the files in the folder including thesubfolder
var dirTarget = COPY_DIST; //target folder

var text = ”; //information to write to the file

//define and execute getFiles(file information acquisitionfunction)
(function getFiles(dir){
var

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post