Blender  V3.3
Functions
GHOST_Path-api.h File Reference
#include "GHOST_Types.h"

Go to the source code of this file.

Functions

 GHOST_DECLARE_HANDLE (GHOST_SystemPathsHandle)
 
GHOST_TSuccess GHOST_CreateSystemPaths (void)
 
GHOST_TSuccess GHOST_DisposeSystemPaths (void)
 
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)
 
void GHOST_addToSystemRecentFiles (const char *filename)
 

Function Documentation

◆ GHOST_addToSystemRecentFiles()

void GHOST_addToSystemRecentFiles ( const char *  filename)

Add the file to the operating system most recently used files

Definition at line 52 of file GHOST_Path-api.cpp.

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

Referenced by wm_history_file_update().

◆ GHOST_CreateSystemPaths()

GHOST_TSuccess GHOST_CreateSystemPaths ( void  )

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

Returns
An indication of success.

Definition at line 15 of file GHOST_Path-api.cpp.

References GHOST_ISystemPaths::create().

Referenced by WM_init().

◆ GHOST_DECLARE_HANDLE()

GHOST_DECLARE_HANDLE ( GHOST_SystemPathsHandle  )

◆ GHOST_DisposeSystemPaths()

GHOST_TSuccess GHOST_DisposeSystemPaths ( void  )

Disposes the one and only system.

Returns
An indication of success.

Definition at line 20 of file GHOST_Path-api.cpp.

References GHOST_ISystemPaths::dispose().

Referenced by BlendfileLoadingBaseTest::TearDownTestCase(), blender::bke::tests::TEST(), and WM_exit_ex().

◆ GHOST_getBinaryDir()

const char* GHOST_getBinaryDir ( void  )

Determine the dir in which the binary file is found.

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

Definition at line 45 of file GHOST_Path-api.cpp.

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

◆ GHOST_getSystemDir()

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

Determine the base dir 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 dir (eg /usr/share/blender/).

Definition at line 25 of file GHOST_Path-api.cpp.

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

Referenced by get_path_system_ex().

◆ GHOST_getUserDir()

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

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

Returns
Unsigned char string pointing to user dir (eg ~).

Definition at line 31 of file GHOST_Path-api.cpp.

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

Referenced by get_path_user_ex().

◆ GHOST_getUserSpecialDir()

const char* GHOST_getUserSpecialDir ( GHOST_TUserSpecialDirTypes  type)

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

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

Definition at line 38 of file GHOST_Path-api.cpp.

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

Referenced by BKE_appdir_folder_caches(), and BKE_appdir_folder_documents().