-------------------------------------------------------------------------
| 93 | |
| 94 | //------------------------------------------------------------------------- |
| 95 | HtmlFile HtmlFolderStructure::CreateCurrentModule(const std::filesystem::path& modulePath) |
| 96 | { |
| 97 | if (!optionalCurrentRoot_) |
| 98 | THROW(L"No root is selected"); |
| 99 | |
| 100 | auto moduleFilename = modulePath.filename(); |
| 101 | auto moduleName = moduleFilename.replace_extension(""); // remove extension |
| 102 | auto folderModules = optionalCurrentRoot_->path_ / HtmlFolderStructure::FolderModules; |
| 103 | |
| 104 | auto moduleFolder = folderModules / moduleName; |
| 105 | auto uniqueModulesFolder = optionalCurrentRoot_->uniqueChildrenPath_.GetUniquePath(moduleFolder); |
| 106 | optionalCurrentModule_ = std::make_unique<Hierarchy>(uniqueModulesFolder); |
| 107 | fs::path moduleHtmlPath = uniqueModulesFolder.wstring() + L".html"; |
| 108 | |
| 109 | return HtmlFile{ |
| 110 | moduleHtmlPath, |
| 111 | fs::path{ HtmlFolderStructure::FolderModules } / moduleHtmlPath.filename() }; |
| 112 | } |
| 113 | |
| 114 | //--------------------------------------------------------------------- |
| 115 | HtmlFile HtmlFolderStructure::GetHtmlFilePath(const std::filesystem::path& filePath) const |