()
| 467 | // Directory Browsing |
| 468 | // ============================================================ |
| 469 | function getDirectoryRoots() { |
| 470 | if (process.platform === 'win32') { |
| 471 | const roots = []; |
| 472 | for (let code = 65; code <= 90; code++) { |
| 473 | const drive = String.fromCharCode(code) + ':\\'; |
| 474 | try { |
| 475 | if (fs.existsSync(drive)) roots.push(drive); |
| 476 | } catch {} |
| 477 | } |
| 478 | return roots; |
| 479 | } |
| 480 | return ['/']; |
| 481 | } |
| 482 | |
| 483 | function assertDirectoryPath(target) { |
| 484 | const resolved = path.resolve(String(target || '')); |
no outgoing calls
no test coverage detected