sys: Replaced many helper functions with libwolv

This commit is contained in:
WerWolv
2023-03-12 18:27:29 +01:00
parent e958934a22
commit 0dafb3d230
62 changed files with 263 additions and 1091 deletions

View File

@@ -47,7 +47,7 @@ namespace hex::plugin::builtin {
ContentRegistry::FileHandler::add({ ".mgc" }, [](const auto &path) {
for (const auto &destPath : fs::getDefaultPaths(fs::ImHexPath::Magic)) {
if (fs::copyFile(path, destPath / path.filename(), std::fs::copy_options::overwrite_existing)) {
if (wolv::io::fs::copyFile(path, destPath / path.filename(), std::fs::copy_options::overwrite_existing)) {
View::showInfoPopup("hex.builtin.view.information.magic_db_added"_lang);
return true;
}
@@ -110,7 +110,7 @@ namespace hex::plugin::builtin {
provider->getBaseAddress(), provider->getSize());
// Create a handle to the file
auto reader = prv::BufferedReader(provider);
auto reader = prv::ProviderReader(provider);
reader.seek(provider->getBaseAddress() + this->m_inputStartAddress);
reader.setEndAddress(provider->getBaseAddress() + this->m_inputEndAddress);