Warning
Parameters
filename
A string representing the destination filename.
If the filename contains a path, the path must already exist. If the destination file exists, the function will fail.
Return value
Returns aboolean value indicating if the operation succeeded.
Example
local file = sys.File("test.txt"):open("write")
file:writeln("Hello World !")
file:close()
-- outputs false : cannot copy "test.txt" to "test.txt"
print(file:copy("test.txt"))