Yuari
Documentation
Docs/File system/copyfile

copyfile

Copies, moves or renames a workspace file.

Syntax

copyfile(a: any, b: any) -> nil

Parameters

ParameterTypeDescription
aanyThe a value used by the call.
banyThe b value used by the call.

Returns

TypeDescription
nilThis 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.