MCPcopy Index your code
hub / github.com/Alex-D/check-disk-space

github.com/Alex-D/check-disk-space @v3.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.4.0 ↗ · + Follow
15 symbols 58 edges 17 files 8 documented · 53% 10 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Check disk space

Continue Integration check-disk-space on npm License MIT

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

// 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
})

Core symbols most depended-on inside this repo

mockDependencies
called by 12
test/__helpers__/mockDependencies.ts
checkDiskSpace
called by 7
src/index.ts
hasPowerShell3
called by 7
src/functions/hasPowerShell3.ts
isDirectoryExisting
called by 4
src/functions/isDirectoryExisting.ts
getFirstExistingParentPath
called by 3
src/functions/getFirstExistingParentPath.ts
check
called by 2
src/index.ts
mapOutput
called by 1
src/index.ts
checkWin32
called by 1
src/index.ts

Shape

Function 9
Class 4
Method 2

Languages

TypeScript100%

Modules by API surface

src/index.ts5 symbols
src/errors/noMatchError.ts3 symbols
src/errors/invalidPathError.ts3 symbols
test/__helpers__/mockDependencies.ts1 symbols
src/functions/isDirectoryExisting.ts1 symbols
src/functions/hasPowerShell3.ts1 symbols
src/functions/getFirstExistingParentPath.ts1 symbols

For agents

$ claude mcp add check-disk-space \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact