Renames (moves) a file from one path to another (file-only; directories are not supported and will throw).
Implemented as a copy-then-remove operation. The source file's contents are copied to the new path and the original is deleted.
await rename("/app/data/old.json", "/app/data/new.json"); Copy
await rename("/app/data/old.json", "/app/data/new.json");
Renames (moves) a file from one path to another (file-only; directories are not supported and will throw).
Implemented as a copy-then-remove operation. The source file's contents are copied to the new path and the original is deleted.