Ajout de la route de copie

This commit is contained in:
Quentin Millardet
2024-01-06 22:16:59 +01:00
parent 132a889dae
commit 02cb1cd738
6 changed files with 149 additions and 0 deletions

View File

@@ -28,5 +28,23 @@ class Deviceinformation {
})
return element;
}
async getMountPoint( deviceName, pointName){
const drivelist = require('drivelist');
const drives =await drivelist.list()
let element = null;
drives.forEach((drive) => {
if (drive.device === deviceName ){
drive.mountpoints.forEach((mountPoint) => {
if (mountPoint.label === pointName){
element = mountPoint.path
}
})
}
})
return element;
}
}
module.exports = Deviceinformation