Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with check file exists or unlink #33

Open
thosankitai1990 opened this issue Dec 3, 2018 · 2 comments
Open

Problem with check file exists or unlink #33

thosankitai1990 opened this issue Dec 3, 2018 · 2 comments

Comments

@thosankitai1990
Copy link

thosankitai1990 commented Dec 3, 2018

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!!!

@SHAPPY0
Copy link

SHAPPY0 commented Apr 27, 2021

Hi,
Just wanted to know if you got this resolved or any alternative? I'm also facing the same issue. @thosankitai1990 @bchelli

@xieerduos
Copy link

I also encountered this problem. Do you know how to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants