sab*_*bir 7 networking node.js
I want to read network folder of my users. Users network folder information is stored in database. For example, \\\\192.168.3.107\\Network is one of my user network folder. As a user, I have made one of my folder Network as Network folder and my IP is 192.168.3.107. Now I want to read all of file inside that network file. I already done this in windows. But I need to implement this on Ubuntu. My code is given below:
const fs = require('fs');
let testFolder = "\\\\192.168.3.107\\Network";
fs.readdir(testFolder, function(error, contents) {
if (error) {
console.log("read error : ", error);
}
for (let content of contents) {
console.log("content : ", content);
}
});
Run Code Online (Sandbox Code Playgroud)
But I always get the following error:
read error : { Error: ENOENT: no such file or directory, scandir '\\192.168.3.107\Network'
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '\\\\192.168.3.107\\Network'
}
Run Code Online (Sandbox Code Playgroud)
As far I know, it means I can't create a network folder.
Any suggestion ??? Thanks in advance.
| 归档时间: |
|
| 查看次数: |
1440 次 |
| 最近记录: |