# check-disk-space

> Light multi-platform disk space checker without third party for Node.js

Latest version **3.4.0** (published 2023-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install check-disk-space
pnpm add check-disk-space
yarn add check-disk-space
bun add check-disk-space
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.4.0 |
| Published | 2023-05-21 |
| First published | 2017-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 0 |
| Unpacked size | 20.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 110 |
| Author | Alex-D |
| Maintainers | alex-d |
| Keywords | disk, space, hdd, free |

## Links

- npm: https://www.npmjs.com/package/check-disk-space
- Repository: https://github.com/Alex-D/check-disk-space
- Homepage: https://github.com/Alex-D/check-disk-space#readme
- Issues: https://github.com/Alex-D/check-disk-space/issues
- npm.io page: https://npm.io/package/check-disk-space

## Recent versions

- 3.4.0 (latest) — 2023-05-21
- 3.3.1 — 2022-07-19
- 3.3.0 — 2022-03-07
- 3.2.0 — 2022-01-24
- 3.1.0 — 2021-11-28
- 3.0.1 — 2021-06-13
- 3.0.0 — 2021-06-13
- 2.1.0 — 2019-06-28
- 2.0.0 — 2019-06-02
- 1.5.0 — 2018-01-11
- 1.4.0 — 2017-10-04
- 1.3.0 — 2017-09-29
- 1.2.0 — 2017-09-29
- 1.1.0 — 2017-09-29
- 1.0.0 — 2017-09-29

## README

# Check disk space

[![Continue Integration](https://img.shields.io/github/workflow/status/Alex-D/check-disk-space/Continuous%20Integration?style=for-the-badge)](https://github.com/Alex-D/check-disk-space/actions/workflows/ci.yml)
[![check-disk-space on npm](https://img.shields.io/npm/v/check-disk-space?style=for-the-badge)](https://www.npmjs.com/package/check-disk-space)
[![License MIT](https://img.shields.io/github/license/Alex-D/check-disk-space.svg?style=for-the-badge)](LICENSE)


## Introduction

Light multi-platform disk space checker without third party for Node.js.

- Works on Linux, macOS and Windows
- Take care of mounting points on unix-like systems
- No dependencies
- TypeScript support


## Install

`npm install check-disk-space`


## Usage

```js
// ES
import checkDiskSpace from 'check-disk-space'

// CommonJS
const checkDiskSpace = require('check-disk-space').default

// On Windows
checkDiskSpace('C:/blabla/bla').then((diskSpace) => {
    console.log(diskSpace)
    // {
    //     diskPath: 'C:',
    //     free: 12345678,
    //     size: 98756432
    // }
    // Note: `free` and `size` are in bytes
})

// On Linux or macOS
checkDiskSpace('/mnt/mygames').then((diskSpace) => {
    console.log(diskSpace)
    // {
    //     diskPath: '/',
    //     free: 12345678,
    //     size: 98756432
    // }
    // Note: `free` and `size` are in bytes
})
```

---
_Source: https://npm.io/package/check-disk-space · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
