Factory Presets, sorting of LICENSE.MD and README.md files.

This commit is contained in:
Robin E. R. Davies
2025-09-08 05:40:34 -04:00
parent f46829ccc5
commit d6ce92f6be
5 changed files with 194 additions and 74 deletions
+2 -20
View File
@@ -37,24 +37,6 @@ using namespace pipedal::implementation;
namespace fs = std::filesystem;
namespace pipedal::implementation {
class BrowserFilesVersionInfo
{
public:
bool Load(std::filesystem::path &path);
void Save(std::filesystem::path &path);
const std::vector<std::string> &InstalledFiles() const;
bool IsInstalled(const std::string &file) const;
void AddFile(const std::string &file);
uint32_t Version() const;
void Version(uint32_t value);
private:
uint32_t version = 0;
std::vector<std::string> installedFiles;
std::unordered_set<std::string> installedFileMap;
};
};
inline uint32_t BrowserFilesVersionInfo::Version() const { return version; }
inline void BrowserFilesVersionInfo::Version(uint32_t value) { version = value; }
@@ -75,7 +57,7 @@ void BrowserFilesVersionInfo::AddFile(const std::string &file)
}
}
bool BrowserFilesVersionInfo::Load(std::filesystem::path &path)
bool BrowserFilesVersionInfo::Load(const std::filesystem::path &path)
{
std::ifstream f{path};
if (!f.is_open())
@@ -102,7 +84,7 @@ FileBrowserFilesFeature::FileBrowserFilesFeature()
feature.URI = LV2_FILEBROWSER__files;
feature.data = &(this->featureData);
}
void BrowserFilesVersionInfo::Save(std::filesystem::path &path)
void BrowserFilesVersionInfo::Save(const std::filesystem::path &path)
{
pipedal::ofstream_synced f{path};
if (!f.is_open())