FILE::CP 1g 2024-10-10 laplante@plcb.ca GOWEB/FILE
title: “FILE::CP”
date: “2024-10-10”
author: “laplante@plcb.ca”
version: “1.0.0”
section: “1g”
category: “GOWEB/FILE”
Name
file::cp — Copy a file with optional mode setting.
Synopsis
- file::cp(file…, [mode: int, error: variable])
- cp(file…, [mode: int, error: variable])
Description
This function copies a file to a new location.
If the destination file already exists, it will be overwritten.
Parameters
- error : variable to capture the error if the file does not exist.
- mode : specify the mode of the destination file (usually given in octal).
Examples
res={{
remove(error: err, "test-039.bak");
cp("test-039", "test-039.bak", mode: 0600);
read("test-039.bak");
}}.
Author
See also
Version
- 1.0.0 — 2024-10-10 laplante@plcb.ca initial version