You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to encrypt almost 10000+ file in a row using following function.
It gives error something like:
## Uncaught Error: EMFILE: too many open files, open 'bun.ogg'
Source code is given bellow.
function copyRecursiveSync(src, dest) {
var exists = fs.existsSync(src);
var stats = exists && fs.statSync(src);
var unSelectedArray = getUnSelectedOptionArray();
var isDirectory = exists && stats.isDirectory();
if (exists && isDirectory) {
var destExist = fs.existsSync(dest);
if (!destExist)
fs.mkdirSync(dest);
fs.readdirSync(src).forEach(function (childItemName) {
copyRecursiveSync(path.join(src, childItemName),
path.join(dest, childItemName));
});
} else {
var splitArray = src.split(".");
if (isFileEncrypt(splitArray[1], unSelectedArray) === true) {
encryptor.encryptFile(src, dest, secrateKey, options, function (err) {});
} else {
fs.linkSync(src, dest);
}
}
}
Please help me to solve this. I am very new in this technology.
Any Other solution for doing this is also excepted.
The text was updated successfully, but these errors were encountered:
Hi @niravjgandhi sorry for the delay. We aren't currently maintaining this repo so I'm going to close this issue for now, but please re-open it if you are still dealing with this issue.
Hello All.
Source code is given bellow.
}
Please help me to solve this. I am very new in this technology.
The text was updated successfully, but these errors were encountered: