RenameFile

This function renames a file.

Syntax

Parameters

Returns

Returns true if the directory was renamed, otherwise false is returned.

Remarks

This function will have no effect if Lua sandboxing is enabled.

Example

--Create a file
local path = "MyFile.txt"
FileSystem:CreateFile(path)
FileSystem:RenameFile(path,"MyNewFile.txt")