MCPcopy Create free account
hub / github.com/DavidColson/Polybox / GenerateProject

Function GenerateProject

source/main.cpp:199–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197// ***********************************************************************
198
199void GenerateProject(String projectName) {
200 // check if directory already exists for the project
201 String projectPath = TempPrint("system/%S/", projectName);
202 if (FolderExists(projectPath)) {
203 Log::Warn("Project with name %s already exists", projectName.pData);
204 return;
205 }
206
207 // create directory for project name
208 MakeDirectory(projectPath, true);
209
210 // create a main.lua template
211 String mainLuaFile = TempPrint("%S%s", projectPath, "main.luau");
212 WriteWholeFile(mainLuaFile, templateProject.pData, templateProject.length);
213
214 Log::Info("Project '%s' created successfully", projectName.pData);
215}
216
217// ***********************************************************************
218

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected