Default to tasks.db in home directory
This commit is contained in:
1 parent
b9557789ff
commit
4c69c164e4
5 files changed
+45
-1
No files matched your search
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include <filesystem>
|
||||
|
||||
/**
|
||||
* @brief Retrieves the current user's home directory across different operating systems.
|
||||
*
|
||||
* On Windows, it checks the USERPROFILE environment variable.
|
||||
* On Unix/Linux/macOS, it checks the HOME environment variable, with a fallback
|
||||
* to checking the password database entry (`getpwuid`) if HOME is unset.
|
||||
*
|
||||
* @return std::filesystem::path Path to the user's home directory, or an empty path if unable to resolve.
|
||||
*/
|
||||
std::filesystem::path getHomeDirectory();
|
||||
Reference in new issue
Block a user