MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / getFreeDiskMb

Function getFreeDiskMb

packages/cli/src/telemetry/system.ts:156–163  ·  view source on GitHub ↗
(path: string = ".")

Source from the content-addressed store, hash-verified

154 * Get available disk space in MB at a given path.
155 */
156export function getFreeDiskMb(path: string = "."): number | null {
157 try {
158 const stats = statfsSync(path);
159 return bytesToMb(stats.bsize * stats.bavail);
160 } catch {
161 return null;
162 }
163}
164
165/**
166 * Get available memory in MB, accounting for OS-level page caching.

Callers 2

checkDiskFunction · 0.85
checkDiskFunction · 0.85

Calls 1

bytesToMbFunction · 0.85

Tested by

no test coverage detected