https://github.com/nextyfine-dev/detect-drives
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.
https://github.com/nextyfine-dev/detect-drives
Last synced: 5 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/nextyfine-dev/detect-drives
- Owner: nextyfine-dev
- License: mit
- Created: 2024-04-14T08:16:13.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T16:43:47.000Z (over 1 year ago)
- Last Synced: 2025-08-28T08:10:39.957Z (10 months ago)
- Language: TypeScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
- [🔍 detect-drives](#detect-drives)
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Initialization](#initialization)
- [Detecting Drives](#detecting-drives)
- [Detecting USB Drives](#detecting-usb-drives)
- [Functions](#functions)
- [License](#license)
## 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:
```bash
npm install detect-drives
```
Install the package using yarn:
```bash
yarn add detect-drives
```
## Usage
### Initialization
```javascript
// CommonJS
const { detectDrives, detectUsbDrives } = require("detect-drives");
// ESM
import { detectDrives, detectUsbDrives } from "detect-drives";
```
### Detecting Drives
```javascript
const drives = await detectDrives();
console.log("Detected Drives:", drives);
```
### Detecting USB Drives
```javascript
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](https://github.com/nextyfine-dev/detect-drives/blob/master/LICENSE). See the [LICENSE](./LICENSE) file for more information.