Make New Project create new projects

This commit is contained in:
2017-04-20 23:15:25 -05:00
parent 9730ef773e
commit 51124966c3
5 changed files with 40 additions and 7 deletions
+7 -3
View File
@@ -16,14 +16,18 @@ namespace studio {
using namespace ox::fs;
void Project::create(QString path) {
QDir().mkpath(path);
Project::Project(QString path) {
m_path = path;
}
void Project::create() {
QDir().mkpath(m_path);
size_t buffLen = 1024;
m_romBuff = new QByteArray(buffLen, 0);
FileSystem32::format(m_romBuff->data(), buffLen, true);
QFile file(path + "/ROM.oxfs");
QFile file(m_path + "/ROM.oxfs");
file.open(QIODevice::WriteOnly);
file.write(*m_romBuff);
file.close();