fs/StandardDirectory: add GetUserRuntimeDir()
This commit is contained in:
@@ -282,6 +282,16 @@ GetUserCacheDir() noexcept
|
||||
#endif
|
||||
}
|
||||
|
||||
AllocatedPath
|
||||
GetUserRuntimeDir() noexcept
|
||||
{
|
||||
#ifdef USE_XDG
|
||||
return SafePathFromFS(getenv("XDG_RUNTIME_DIR"));
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
AllocatedPath
|
||||
|
||||
@@ -43,6 +43,13 @@ GetUserMusicDir() noexcept;
|
||||
AllocatedPath
|
||||
GetUserCacheDir() noexcept;
|
||||
|
||||
/**
|
||||
* Obtains the runtime directory for the current user.
|
||||
*/
|
||||
[[gnu::const]]
|
||||
AllocatedPath
|
||||
GetUserRuntimeDir() noexcept;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user