diff --git a/src/app.js b/src/app.js index ad9a93a..1f81bf7 100644 --- a/src/app.js +++ b/src/app.js @@ -1 +1,28 @@ 'use strict'; + +const fs = require('fs'); + +function copyFiles(source, destination) { + if (!source) { + // eslint-disable-next-line no-console + console.error('No source provided'); + + return; + } + + if (!destination) { + // eslint-disable-next-line no-console + console.error('No destination provided'); + + return; + } + + fs.cp(source, destination, (err) => { + if (err) { + // eslint-disable-next-line no-console + console.error(err); + } + }); +} + +copyFiles(...process.argv.slice(2, 4));