Comparing version 0.0.2 to 0.1.0
@@ -16,3 +16,3 @@ /* | ||
module.exports = function mergeDirs(f1, f2) { | ||
module.exports = function mergeDirs(f1, f2, overwriteExistingFiles) { | ||
var file, files, stats, _i, _len, _results; | ||
@@ -25,5 +25,5 @@ files = fs.readdirSync(f1); | ||
if (stats.isDirectory()) { | ||
mergeDirs("" + f1 + "/" + file, "" + f2 + "/" + file) | ||
mergeDirs("" + f1 + "/" + file, "" + f2 + "/" + file, overwriteExistingFiles) | ||
} else { | ||
if (!fs.existsSync("" + f2 + "/" + file)) { | ||
if (!fs.existsSync("" + f2 + "/" + file) || overwriteExistingFiles) { | ||
fs.mkdirSync(("" + f2 + "/" + file).split("/").slice(0, -1).join("/"), 0x1ed, true); | ||
@@ -30,0 +30,0 @@ fs.writeFileSync("" + f2 + "/" + file, fs.readFileSync("" + f1 + "/" + file)); |
{ | ||
"name": "merge-dirs", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "node module to synchronously and recursively merge files from one folder to another", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4814