mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Autoupdate: implement updating bootstrapper utility (#5204)
This commit is contained in:
22
src/common/RcResource.h
Normal file
22
src/common/RcResource.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <filesystem>
|
||||
|
||||
class RcResource
|
||||
{
|
||||
public:
|
||||
std::span<const std::byte> _memory;
|
||||
|
||||
static std::optional<RcResource> create(int resource_id, const std::wstring_view resource_class);
|
||||
bool saveAsFile(const std::filesystem::path destination);
|
||||
|
||||
private:
|
||||
RcResource() = delete;
|
||||
RcResource(std::span<const std::byte> memory) :
|
||||
_memory{ std::move(memory) }
|
||||
{
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user