node-drives
v0.0.4
Published
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
Downloads
20
Maintainers
Readme
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()
support
[x] windows7 [x] windows10 [x] windows11 [x] Linux [x] macOs