copyFileSync
import { copyFileSync } from "jsr:@ende/fs/unstable-copy-file";function · experimental · requires --allow-read, --allow-write
function copyFileSync(from: string | URL, to: string | URL): voidSynchronously copies the contents and permissions of one file to another specified path, by default creating a new file if needed, else overwriting. Fails if target path is a directory or is unwritable.
Requires allow-read and allow-write permission.
For a full description, see copyFileSync.
from: string | URLThe path of source filename to copy.
to: string | URLThe path of destination filename.
Example: Usage
import { copyFileSync } from "@ende/fs/unstable-copy-file";
copyFileSync("README.md", "README-Copy.md");