HostInterface: Add a helper function for generating timestamp-based filenames
This commit is contained in:
parent
c7a74cabaa
commit
198a64eb5e
2 changed files with 13 additions and 0 deletions
|
|
@ -696,6 +696,15 @@ std::string HostInterface::GetUserDirectoryRelativePath(const char* format, ...)
|
|||
}
|
||||
}
|
||||
|
||||
TinyString HostInterface::GetTimestampStringForFileName()
|
||||
{
|
||||
const Timestamp ts(Timestamp::Now());
|
||||
|
||||
TinyString str;
|
||||
ts.ToString(str, "%Y-%m-%d_%H-%M-%S");
|
||||
return str;
|
||||
}
|
||||
|
||||
std::string HostInterface::GetSettingsFileName() const
|
||||
{
|
||||
return GetUserDirectoryRelativePath("settings.ini");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue