Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

400 B
Raw Blame
import { rename } from "node:fs/promises";

/** Publish a complete file without changing the bytes held by existing readers. */
export async function replaceFile(from: string, to: string): Promise<void> {
  if (process.platform === "win32") {
    const { replaceWindowsFile } = await import("./replace-file-windows.js");
    replaceWindowsFile(from, to);
  } else {
    await rename(from, to);
  }
}