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

#include "Leadwerks.h"

using namespace Leadwerks;

Entity* entity = NULL;

int main(int argc, const char *argv[])
{
//Create a file
std::string path = "MyDir";
FileSystem::CreateDir(path);

//Copy the folder "MyDir" as "MyDir2"
std::string newpath = path + "2";
FileSystem::CopyDir(path, newpath);

return 0;
}