UNPKG

filefive

Version:

SFTP/FTP/Amazon S3 client and dual-panel file manager for macOS and Linux

21 lines (20 loc) 543 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getDrives = getDrives; const node_fs_1 = require("node:fs"); let drives = null; function getDrives() { if (drives !== null) { return drives; } drives = []; for (let i = 65; i <= 90; i++) { // A: to Z: const drive = String.fromCharCode(i) + ':\\'; try { (0, node_fs_1.accessSync)(drive, node_fs_1.constants.F_OK); drives.push(drive); } catch (err) { } } return drives; }