Mkdir not working ?
san-slysz opened this issue · 1 comments
san-slysz commented
I have been trying to use smb2 to create a new folder on remote.
I am not sure what 'path' is suppose to hold (absolute path on share, relative path to share, ...)
Imagine this
const smb2Client = new SMB2({
share:'\\\\ip.ip.ip.ip\\c$\\shareFolder',
domain:'ME',
username:'my',
password:'1234'
});
Then if I want to create 'plop' under 'shareFolder' what should I wrote?
I tried
smb2Client.mkdir('plop'
smb2Client.mkdir('.\plop'
smb2Client.mkdir('.\\plop'
smb2Client.mkdir('\\\\ip.ip.ip.ip\\c$\\shareFolder\\plop'
None seems to work.
Could you tell me if I'm doing this wrong?
san-ouadghiri commented
Considering an existing hello folder, with a.txt in it
// This works
smb2Client.readFile('hello\\a.txt', function(err, data){
if(err) throw err;
console.log(data);
});
// This doesn't
smb2Client.mkdir('hello\\plop', function (err) {
if(err) throw err;
console.log('Folder created!');
});