CopyDir

This function copies a directory from one location to another.

Syntax

Parameters

Remarks

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

This function does not work on platforms that use virtual file systems, as mobile does.

Example

--Create a file
local path = "MyDir"
FileSystem:CreateDir(path)

--Copy the folder "MyDir" as "MyDir2"
local newpath = path.."2"
FileSystem:CopyDir(path,newpath)

end