Blender V4.5
GHOST_Path-api.hh File Reference
#include "GHOST_Types.h"

Go to the source code of this file.

Functions

 GHOST_DECLARE_HANDLE (GHOST_SystemPathsHandle)
GHOST_TSuccess GHOST_CreateSystemPaths ()
GHOST_TSuccess GHOST_DisposeSystemPaths ()
const char * GHOST_getSystemDir (int version, const char *versionstr)
const char * GHOST_getUserDir (int version, const char *versionstr)
const char * GHOST_getUserSpecialDir (GHOST_TUserSpecialDirTypes type)
const char * GHOST_getBinaryDir ()
void GHOST_addToSystemRecentFiles (const char *filepath)

Function Documentation

◆ GHOST_addToSystemRecentFiles()

void GHOST_addToSystemRecentFiles ( const char * filepath)
extern

Add the file to the operating system most recently used files

Definition at line 51 of file GHOST_Path-api.cc.

References GHOST_ISystemPaths::addToSystemRecentFiles(), GHOST_ISystemPaths::get(), and GHOST_addToSystemRecentFiles().

Referenced by GHOST_addToSystemRecentFiles(), GHOST_DECLARE_HANDLE(), and wm_history_file_update().

◆ GHOST_CreateSystemPaths()

GHOST_TSuccess GHOST_CreateSystemPaths ( )
extern

Creates the one and only instance of the system path access.

Returns
An indication of success.

Definition at line 14 of file GHOST_Path-api.cc.

References GHOST_ISystemPaths::create(), and GHOST_CreateSystemPaths().

Referenced by GHOST_CreateSystemPaths(), and GHOST_DECLARE_HANDLE().

◆ GHOST_DECLARE_HANDLE()

◆ GHOST_DisposeSystemPaths()

◆ GHOST_getBinaryDir()

const char * GHOST_getBinaryDir ( )
extern

Determine the directory in which the binary file is found.

Returns
Unsigned char string pointing to binary directory (eg ~/usr/local/bin/).

Definition at line 44 of file GHOST_Path-api.cc.

References GHOST_ISystemPaths::get(), GHOST_ISystemPaths::getBinaryDir(), and GHOST_getBinaryDir().

Referenced by GHOST_DECLARE_HANDLE(), and GHOST_getBinaryDir().

◆ GHOST_getSystemDir()

const char * GHOST_getSystemDir ( int version,
const char * versionstr )
extern

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/).
Note
typically: BKE_appdir_resource_path_id(BLENDER_RESOURCE_PATH_SYSTEM, false) should be used instead of this function directly as it ensures environment variable overrides are used.

Definition at line 24 of file GHOST_Path-api.cc.

References GHOST_ISystemPaths::get(), GHOST_ISystemPaths::getSystemDir(), and GHOST_getSystemDir().

Referenced by get_path_system_ex(), GHOST_DECLARE_HANDLE(), and GHOST_getSystemDir().

◆ GHOST_getUserDir()

const char * GHOST_getUserDir ( int version,
const char * versionstr )
extern

Determine the base directory in which user configuration is stored, including versioning.

Returns
Unsigned char string pointing to user directory (eg ~).
Note
typically: BKE_appdir_resource_path_id(BLENDER_RESOURCE_PATH_USER, false) should be used instead of this function directly as it ensures environment variable overrides are used.

Definition at line 30 of file GHOST_Path-api.cc.

References GHOST_ISystemPaths::get(), GHOST_ISystemPaths::getUserDir(), and GHOST_getUserDir().

Referenced by get_path_user_ex(), GHOST_DECLARE_HANDLE(), and GHOST_getUserDir().

◆ GHOST_getUserSpecialDir()

const char * GHOST_getUserSpecialDir ( GHOST_TUserSpecialDirTypes type)
extern

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

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

Definition at line 37 of file GHOST_Path-api.cc.

References GHOST_ISystemPaths::get(), GHOST_ISystemPaths::getUserSpecialDir(), and GHOST_getUserSpecialDir().

Referenced by BKE_appdir_folder_caches(), BKE_appdir_folder_documents(), GHOST_DECLARE_HANDLE(), and GHOST_getUserSpecialDir().