filesystem.copy_file

Synopsis

local fs = require "filesystem"
fs.copy_file(from: fs.path, to: fs.path[, on_existing: "skip"|"overwrite"|"update"]) -> boolean

on_existing

Behavior when the file already exists.

nil

Report an error.

"skip"

Keep the existing file, without reporting an error.

"overwrite"

Replace the existing file.

"update"

Replace the existing file only if it is older than the file being copied.