Blender V4.3
GHOST_Path-api.cc File Reference
#include <cstdio>
#include "GHOST_ISystemPaths.hh"
#include "GHOST_Path-api.hh"
#include "GHOST_Types.h"
#include "intern/GHOST_Debug.hh"

Go to the source code of this file.

Functions

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)

Add the file to the operating system most recently used files

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

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

Referenced by wm_history_file_update().

◆ GHOST_CreateSystemPaths()

GHOST_TSuccess GHOST_CreateSystemPaths ( )

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

Returns
An indication of success.

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

References GHOST_ISystemPaths::create().

◆ GHOST_DisposeSystemPaths()

GHOST_TSuccess GHOST_DisposeSystemPaths ( )

Disposes the one and only system.

Returns
An indication of success.

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

References GHOST_ISystemPaths::dispose().

Referenced by BKE_appdir_exit(), blender::bke::image::partial_update::ImagePartialUpdateTest::TearDown(), and blender::bke::tests::Context< TestData >::~Context().

◆ GHOST_getBinaryDir()

const char * GHOST_getBinaryDir ( )

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 46 of file GHOST_Path-api.cc.

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

◆ GHOST_getSystemDir()

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

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 26 of file GHOST_Path-api.cc.

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 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 32 of file GHOST_Path-api.cc.

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 directory (eg ~/Documents/).

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

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

Referenced by BKE_appdir_folder_caches(), and BKE_appdir_folder_documents().