CopyDir
This function copies a directory from one location to another.
Syntax
- bool CopyDir(string src, string dst)
Parameters
- src: this is the directory to copy.
- dst: this is the path to the new directory to create.
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