YoggieEngine/Editor/src/Project.cpp

21 lines
491 B
C++
Raw Normal View History

#include "Project.h"
#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
#include <yaml-cpp/yaml.h>
void Project::CreateProject(std::filesystem::path path) {
YAML::Emitter projectYAML;
projectYAML << YAML::Key << "Project" << YAML::Value << "new";
std::ofstream projectFile;
path.append(ProjectName.append(".yproj"));
std::cout << path.u8string() << std::endl;
projectFile.open(path.u8string());
projectFile << projectYAML.c_str();
projectFile.close();
}