node-smb2
node-smb2 copied to clipboard
Problem with check file exists or unlink
Hello I found your smb2 is convenient. But I have a issue with remove file my folder: "dev" my file: "89b775f5-10c2-49d3-8b2c-c76000dad5bc.jpeg" ( existed) I tried to remove file follow:
smb2Client.unlink("dev\\89b775f5-10c2-49d3-8b2c-c76000dad5bc.jpeg", function (err) {
if (err) {
console.log(err);
next(err);
}
console.log("file has been deleted");
return next();
});
But I got a error message: "File does not exists." I used smb2 "exists":
smb2Client.exists(`dev\\89b775f5-10c2-49d3-8b2c-c76000dad5bc.jpeg`, function (err, exists) {
if (err) {
console.log(err);
next(err);
}
console.log(exists ? "it's there" : "it's not there!");
return next();
});
But I got the same message, too. Please help me check it! Thanks for support!!!
Hi, Just wanted to know if you got this resolved or any alternative? I'm also facing the same issue. @thosankitai1990 @bchelli
I also encountered this problem. Do you know how to fix it