detect-drives
v1.2.0
Published
Detect Drives: A Node.js package for effortlessly identifying and gathering information about drives across Windows, macOS, and Linux systems. Simple, cross-platform drive detection and retrieval for your applications.
Downloads
15
Maintainers
Readme
🔍 detect-drives
detect-drives: Cross-platform Node.js library for detecting drives and retrieving disk information
🚀 A versatile Node.js library for effortless drive detection and detailed disk information retrieval. Seamlessly discover drives on Windows, macOS, and Linux systems, empowering your applications with comprehensive storage insights.
Table of Contents
Features
- 🖥️ Detect drives on Windows, macOS, and Linux systems effortlessly.
- 📄 Retrieve detailed disk information including file system, size, usage, and more.
- 🔌 Detect USB drives with ease.
- 🌐 Cross-platform compatibility ensures seamless integration across diverse environments.
- 🛠️ Versatile API for flexible usage in various Node.js applications.
- 💻 Lightweight and dependency-free, keeping your projects efficient and agile.
- 🔄 Asynchronous and synchronous programming paradigms supported for enhanced flexibility.
- 📦 Easy installation via npm or yarn for quick setup.
detect-drives provides a comprehensive solution for drive detection and disk information retrieval, ensuring smooth operation and deep insights into storage systems.
Installation
Install the package using npm:
npm install detect-drives
Install the package using yarn:
yarn add detect-drives
Usage
Initialization
// CommonJS
const { detectDrives, detectUsbDrives } = require("detect-drives");
// ESM
import { detectDrives, detectUsbDrives } from "detect-drives";
Detecting Drives
const drives = await detectDrives();
console.log("Detected Drives:", drives);
Detecting USB Drives
const usbDrives = await detectUsbDrives();
console.log("Detected USB Drives:", usbDrives);
Functions
detectDrives()
detectUsbDrives()
detectAllLinuxDrives()
detectDrivesOnWindows()
detectDrivesOnUnix()
License
This package is licensed under the MIT License. See the LICENSE file for more information.