copyfile
Copies, moves or renames a workspace file.
Syntax
copyfile(a: any, b: any) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
a | any | The a value used by the call. |
b | any | The b value used by the call. |
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
copyfile is part of the File system library. File APIs are limited to the Yuari workspace under %LOCALAPPDATA%\Yuari\workspace; absolute paths and traversal outside it are rejected.
The change is applied directly to the live target, so later reads observe the updated value.
The aliases movefile(a, b), renamefile(a, b) resolve to the same implementation.
Example
copyfile("a.txt", "b.txt")
movefile("b.txt", "c.txt")
renamefile("c.txt", "d.txt")
Notes
- Aliases:
movefile(a, b),renamefile(a, b). - All paths are confined to %LOCALAPPDATA%\Yuari\workspace.