mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 13:15:57 +00:00
os: Add helper to find host temp directory
This commit is contained in:
@@ -233,6 +233,7 @@ void GetDefaultFiles(const char *logBaseName, string &capture_filename, string &
|
||||
string &target);
|
||||
string GetHomeFolderFilename();
|
||||
string GetAppFolderFilename(const string &filename);
|
||||
string GetTempFolderFilename();
|
||||
string GetReplayAppFilename();
|
||||
|
||||
void CreateParentDirectory(const string &filename);
|
||||
|
||||
@@ -59,6 +59,11 @@ string GetHomeFolderFilename()
|
||||
return homedir;
|
||||
}
|
||||
|
||||
string GetTempFolderFilename()
|
||||
{
|
||||
return string(GetTempRootPath()) + "/";
|
||||
}
|
||||
|
||||
void CreateParentDirectory(const string &filename)
|
||||
{
|
||||
string fn = dirname(filename);
|
||||
|
||||
@@ -328,6 +328,15 @@ string GetAppFolderFilename(const string &filename)
|
||||
return ret;
|
||||
}
|
||||
|
||||
string GetTempFolderFilename()
|
||||
{
|
||||
wchar_t temp_filename[MAX_PATH];
|
||||
|
||||
GetTempPathW(MAX_PATH, temp_filename);
|
||||
|
||||
return StringFormat::Wide2UTF8(wstring(temp_filename));
|
||||
}
|
||||
|
||||
uint64_t GetModifiedTimestamp(const string &filename)
|
||||
{
|
||||
wstring wfn = StringFormat::UTF82Wide(filename);
|
||||
|
||||
Reference in New Issue
Block a user