| 95 | } |
| 96 | |
| 97 | bool BoxedContainer::saveContainer() { |
| 98 | BString iniFilePath = dirPath.stringByApppendingPath("container.ini"); |
| 99 | ConfigFile config(iniFilePath); |
| 100 | config.writeString(B("Name"), this->name); |
| 101 | std::shared_ptr<FileSystemZip> fs = this->fileSystem.lock(); |
| 102 | config.writeString(B("FileSystemZipName"), fs->name); |
| 103 | for (int i = 0; i < (int)this->mounts.size(); i++) { |
| 104 | config.writeString("Mount" + BString::valueOf(i + 1), this->mounts[i].localPath + "|" + this->mounts[i].nativePath); |
| 105 | } |
| 106 | config.saveChanges(); |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | void BoxedContainer::deleteContainerFromFilesystem() { |
| 111 | Fs::deleteNativeDirAndAllFilesInDir(this->dirPath); |
no test coverage detected