mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
9 lines
330 B
TypeScript
9 lines
330 B
TypeScript
import { mkdtempSync } from "node:fs";
|
|
import { tmpdir } from "node:os";
|
|
import { join } from "node:path";
|
|
|
|
/** Atomically allocate an owner-only preview directory under the OS temp root. */
|
|
export function createCatalogPreviewTempDir(itemName: string): string {
|
|
return mkdtempSync(join(tmpdir(), `hf-catalog-${itemName}-`));
|
|
}
|