Copies a file from one path to another.
Reads the source file and writes its contents to the destination path. If the source is a text file, text content is preserved; otherwise the binary representation is used.
await copyFile("/app/data/save.json", "/app/data/save-backup.json"); Copy
await copyFile("/app/data/save.json", "/app/data/save-backup.json");
Copies a file from one path to another.
Reads the source file and writes its contents to the destination path. If the source is a text file, text content is preserved; otherwise the binary representation is used.