SlHelpers
Loading...
Searching...
No Matches
SlHelpers::HomeDir Class Reference

Helpers for $HOME directory. More...

#include <HomeDir.h>

Static Public Member Functions

static std::filesystem::path get () noexcept
 Obtains home directory.
static std::filesystem::path getCacheDir () noexcept
 Obtains directory for caching.
static std::filesystem::path createCacheDir (const std::filesystem::path &subdir) noexcept
 Creates (if not existing) and returns getCacheDir() / subdir.

Detailed Description

Helpers for $HOME directory.

Member Function Documentation

◆ createCacheDir()

std::filesystem::path SlHelpers::HomeDir::createCacheDir ( const std::filesystem::path & subdir)
inlinestaticnoexcept

Creates (if not existing) and returns getCacheDir() / subdir.

Parameters
subdirSubdirectory to append to cache dir
Returns
Created getCacheDir() / subdir.

◆ get()

std::filesystem::path SlHelpers::HomeDir::get ( )
inlinestaticnoexcept

Obtains home directory.

Returns
$HOME or /etc/passwd home entry.

◆ getCacheDir()

std::filesystem::path SlHelpers::HomeDir::getCacheDir ( )
inlinestaticnoexcept

Obtains directory for caching.

Returns
$XDG_CACHE_HOME or $HOME/.cache.

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/slhelpers-20260428.f233ce9-build/slhelpers-20260428.f233ce9/include/helpers/HomeDir.h