df:从`df -kP`获取可用磁盘空间信息

时间:2021-05-09 08:00:40
【文件属性】:
文件名称:df:从`df -kP`获取可用磁盘空间信息
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-09 08:00:40
JavaScript df 从获取可用磁盘空间信息 可在任何基于Unix的系统(例如macOS和Linux)上运行。 因为所有其他df包装器都糟糕而创建。 这使用简单和显式的解析。 使用execFile而不是exec 。 使用-P标志可确保更好的平台可移植性。 以字节(而不是千字节)为单位返回大小,并以浮点数返回容量。 安装 $ npm install @sindresorhus/df 用法 const df = require ( '@sindresorhus/df' ) ; ( async ( ) => { console . log ( await df ( ) ) ; /* [ { filesystem: '/dev/disk1', type: 'ext4', size: 499046809600, used: 443222245376, available:
【文件预览】:
df-main
----index.test-d.ts(517B)
----.gitattributes(19B)
----.github()
--------workflows()
----test.js(2KB)
----license(1KB)
----index.d.ts(2KB)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(2KB)
----readme.md(2KB)
----package.json(709B)

网友评论