Blender V5.3
GHOST_SystemPathsUnix Class Reference

#include <GHOST_SystemPathsUnix.hh>

Inherits GHOST_SystemPaths.

Public Member Functions

 GHOST_SystemPathsUnix ()
 ~GHOST_SystemPathsUnix () override
const char * getSystemDir (int version, const char *versionstr) const override
const char * getSystemLibsDir (int version, const char *versionstr) const override
const char * getUserDir (int version, const char *versionstr) const override
std::optional< std::string > getUserSpecialDir (GHOST_TUserSpecialDirTypes type) const override
const char * getBinaryDir () const override
void addToSystemRecentFiles (const char *filepath) const override

Additional Inherited Members

Static Public Member Functions inherited from GHOST_ISystemPaths
static GHOST_TSuccess create ()
static GHOST_TSuccess dispose ()
static GHOST_ISystemPaths * get ()
Protected Member Functions inherited from GHOST_SystemPaths
 GHOST_SystemPaths ()
 ~GHOST_SystemPaths () override=default
Protected Member Functions inherited from GHOST_ISystemPaths
 GHOST_ISystemPaths ()
virtual ~GHOST_ISystemPaths ()=default

Detailed Description

Definition at line 19 of file GHOST_SystemPathsUnix.hh.

Constructor & Destructor Documentation

◆ GHOST_SystemPathsUnix()

GHOST_SystemPathsUnix::GHOST_SystemPathsUnix ( )
default

Constructor this class should only be instantiated by GHOST_ISystem.

Referenced by GHOST_ISystemPaths::create().

◆ ~GHOST_SystemPathsUnix()

GHOST_SystemPathsUnix::~GHOST_SystemPathsUnix ( )
overridedefault

Member Function Documentation

◆ addToSystemRecentFiles()

void GHOST_SystemPathsUnix::addToSystemRecentFiles ( const char * filepath) const
overridevirtual

Add the file to the operating system most recently used files

Implements GHOST_SystemPaths.

Definition at line 211 of file GHOST_SystemPathsUnix.cc.

Referenced by ~GHOST_SystemPathsUnix().

◆ getBinaryDir()

const char * GHOST_SystemPathsUnix::getBinaryDir ( ) const
overridevirtual

Determine the directory of the current binary.

Returns
Unsigned char string pointing to the binary directory.

Implements GHOST_SystemPaths.

Definition at line 206 of file GHOST_SystemPathsUnix.cc.

Referenced by ~GHOST_SystemPathsUnix().

◆ getSystemDir()

const char * GHOST_SystemPathsUnix::getSystemDir ( int version,
const char * versionstr ) const
overridevirtual

Determine the base directory in which shared resources are located. It will first try to use "unpack and run" path, then look for properly installed path, including versioning.

Returns
Unsigned char string pointing to system directory (eg /usr/share/blender/).

Implements GHOST_SystemPaths.

Definition at line 42 of file GHOST_SystemPathsUnix.cc.

References static_path.

Referenced by ~GHOST_SystemPathsUnix().

◆ getSystemLibsDir()

const char * GHOST_SystemPathsUnix::getSystemLibsDir ( int version,
const char * versionstr ) const
overridevirtual

Determine the base directory for architecture-dependent shared libraries, mirroring getSystemDir under the install lib tree (eg /usr/lib/blender/).

Returns
Unsigned char string pointing to the system libraries directory or null when the system-libraries path is not used.

Reimplemented from GHOST_ISystemPaths.

Definition at line 53 of file GHOST_SystemPathsUnix.cc.

References static_libs_path.

Referenced by ~GHOST_SystemPathsUnix().

◆ getUserDir()

const char * GHOST_SystemPathsUnix::getUserDir ( int version,
const char * versionstr ) const
overridevirtual

Determine the base directory in which user configuration is stored, including versioning. If needed, it will create the base directory.

Returns
Unsigned char string pointing to user directory (eg ~/.config/.blender/).

Implements GHOST_SystemPaths.

Definition at line 77 of file GHOST_SystemPathsUnix.cc.

References home_dir_get().

Referenced by ~GHOST_SystemPathsUnix().

◆ getUserSpecialDir()

std::optional< std::string > GHOST_SystemPathsUnix::getUserSpecialDir ( GHOST_TUserSpecialDirTypes type) const
overridevirtual

Determine a special ("well known") and easy to reach user directory.

Returns
If successful, a string containing the user directory path (eg ~/Documents/).

Implements GHOST_ISystemPaths.

Definition at line 189 of file GHOST_SystemPathsUnix.cc.

References GHOST_ASSERT, GHOST_kUserSpecialDirType_Num, lock, and user_special_dir_query().

Referenced by ~GHOST_SystemPathsUnix().


The documentation for this class was generated from the following files: