1.2.0 ⢠Published 1 year ago
detect-drives v1.2.0
š 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.