MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / GetAppStorageFolder

Method GetAppStorageFolder

TranslucentTB/uwp/uwp.cpp:81–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81std::optional<std::filesystem::path> UWP::GetAppStorageFolder()
82{
83 if (const auto familyName = UWP::GetPackageFamilyName())
84 {
85 wil::unique_cotaskmem_string appdata;
86 HresultVerify(
87 SHGetKnownFolderPath(FOLDERID_LocalAppData, KF_FLAG_NO_PACKAGE_REDIRECTION, nullptr, appdata.put()),
88 spdlog::level::critical,
89 L"Failed to get local app data folder"
90 );
91
92 std::filesystem::path storage = appdata.get();
93 storage /= L"Packages";
94 storage /= *familyName;
95 return std::move(storage);
96 }
97 else
98 {
99 return std::nullopt;
100 }
101}
102
103winrt::fire_and_forget UWP::OpenUri(const wf::Uri &uri)
104{

Callers

nothing calls this directly

Calls 2

putMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected