mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
11 lines
404 B
TypeScript
11 lines
404 B
TypeScript
import { createFileAtomically } from "@hyperframes/core/atomic-file";
|
|
|
|
/** Publish complete content without replacing or following an existing destination entry. */
|
|
export function writeNewFileSync(filePath: string, content: string): void {
|
|
try {
|
|
createFileAtomically(filePath, content);
|
|
} catch (err) {
|
|
if (!(err instanceof Error && "code" in err && err.code === "EEXIST")) throw err;
|
|
}
|
|
}
|