0.0.4 • Published 11 months ago
node-drives v0.0.4
Release 🚀
node-drives provides all hard used disks with disk allocation and mount point.
The project is does not need node-gyp.
Windows & Linux are macOs
Usage
import { getAppointDiskSize, getCpuInfo } from 'node-drives'
// 获取指定盘符的大小和剩余空间
const disk = 'C:' // disk , 默认C; 可以传入其他盘符
const result = await getAppointDiskSize(disk)
console.log(result)
/*
Output
{
caption: 'C:', // disks
NTFS,
freeSpace: 31685632, // free space
tolalSize: 100663296, // total free space
}
*/
// 获取cpu信息
const result = await getCpuInfo()