#tde-devs < 2023/01/04 > |
[09:58] | SlavekB has quit (Quit: Kopete 0.12.7 : http://trinitydesktop.org) |
[10:54] | SlavekB has joined |
[11:29] | |akh|: Portability question: Does TDE provide an abstraction for reading the environment? |
[11:29] | |akh|: I'm (currently) specifically interested in getting the user's home directory |
[11:30] | |akh|: The obvious was is to read the HOME environment variable: |
[11:30] | |akh|: TQString homeDir = std::getenv("HOME"); |
[11:30] | |akh|: Is this the best approach under TDE or should I be doing something else? |
[12:37] | SlavekB: You can look at the TDEStandardDirs class API: |
[12:37] | SlavekB: https://www.trinitydesktop.org/docs/trinity/tdelibs/tdecore/html/classTDEStandardDirs.html |
[12:45] | |akh|: thnx. I see that includes the /tmp directory. I'm not seeing anything for $HOME though (I do see the TDE home ~/.trinity but I want ~/) |
[12:50] | |akh|: Looking at things a different way, is it safe to assume that the HOME environment variable is set on all platforms that TDE runs on? |
[14:23] | SlavekB: Yes, there is probably a reliable assumption that $HOME will always be valid. |
[14:35] | |akh|: thanks again |
[18:38] | SlavekB has quit (Quit: TDE Kopete : https://trinitydesktop.org) |
[21:56] | SlavekB has joined |
© 2010-2024 Trinity Desktop Project