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

how to know that cifs connection is established or not? #73

Open
azamsolix opened this issue Dec 2, 2020 · 0 comments
Open

how to know that cifs connection is established or not? #73

azamsolix opened this issue Dec 2, 2020 · 0 comments

Comments

@azamsolix
Copy link

azamsolix commented Dec 2, 2020

var SMB2 = require('@marsaud/smb2');
async function m1() {
  // create an SMB2 instance
  var smb2Client = new SMB2({
    share: '***',
        domain: '***',
        username: '**',
        password: '*****',
        autoCloseTimeout:0
  });
  // console.log(smb2Client)
  let ans = await smb2Client;
  console.log('aa',ans)
 smb2Client.readFile('share-apis.txt', function(err, content) {
  if (err) throw err;
  console.log(content.toString());
});
}
m1()  ;

I am getting smbclient object in which connected property is returning false,However,I am able to use smb2client to read file
Output:
cifscapture

SO,I how can i know that connection is established or not.I just want to test the connection whether it is connected successfully or not.
Thanks
Azam

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

1 participant