Files
UHD_Media_Tool/apps/server/src/proc-read.ts
T

10 lines
294 B
TypeScript

import { readFile } from "node:fs/promises";
/** Linux 资源监控和子进程 RSS;权限不足或进程已退出时返回 null。 */
export async function readProcText(path: string): Promise<string | null> {
try {
return await readFile(path, "utf8");
} catch {
return null;
}
}