Blender  V3.3
Functions
path.h File Reference
#include <stdio.h>
#include "util/set.h"
#include "util/string.h"
#include "util/types.h"
#include "util/vector.h"

Go to the source code of this file.

Functions

CCL_NAMESPACE_BEGIN void path_init (const string &path="", const string &user_path="")
 
string path_get (const string &sub="")
 
string path_user_get (const string &sub="")
 
string path_cache_get (const string &sub="")
 
string path_filename (const string &path)
 
string path_dirname (const string &path)
 
string path_join (const string &dir, const string &file)
 
string path_escape (const string &path)
 
bool path_is_relative (const string &path)
 
size_t path_file_size (const string &path)
 
bool path_exists (const string &path)
 
bool path_is_directory (const string &path)
 
string path_files_md5_hash (const string &dir)
 
uint64_t path_modified_time (const string &path)
 
void path_create_directories (const string &path)
 
FILE * path_fopen (const string &path, const string &mode)
 
bool path_write_binary (const string &path, const vector< uint8_t > &binary)
 
bool path_write_text (const string &path, string &text)
 
bool path_read_binary (const string &path, vector< uint8_t > &binary)
 
bool path_read_text (const string &path, string &text)
 
bool path_remove (const string &path)
 
string path_source_replace_includes (const string &source, const string &path)
 
void path_cache_clear_except (const string &name, const set< string > &except)
 

Function Documentation

◆ path_cache_clear_except()

void path_cache_clear_except ( const string &  name,
const set< string > &  except 
)

◆ path_cache_get()

string path_cache_get ( const string &  sub = "")

Definition at line 358 of file path.cpp.

References cached_xdg_cache_path, path_join(), path_user_get(), and result.

◆ path_create_directories()

void path_create_directories ( const string &  path)

Definition at line 642 of file path.cpp.

References create_directories_recursivey(), and path_dirname().

Referenced by path_write_binary().

◆ path_dirname()

string path_dirname ( const string &  path)

◆ path_escape()

string path_escape ( const string &  path)

Definition at line 435 of file path.cpp.

References result, and string_replace().

Referenced by TEST().

◆ path_exists()

bool path_exists ( const string &  path)

◆ path_file_size()

size_t path_file_size ( const string &  path)

Definition at line 550 of file path.cpp.

References path_stat(), and usdtokens::st().

Referenced by TileManager::finish_write_tiles(), and path_read_binary().

◆ path_filename()

string path_filename ( const string &  path)

Definition at line 376 of file path.cpp.

References DIR_SEP.

Referenced by main(), OIIOImageLoader::name(), path_cache_clear_except(), TEST(), and xml_read_file().

◆ path_files_md5_hash()

string path_files_md5_hash ( const string &  dir)

Definition at line 606 of file path.cpp.

References hash, and path_files_md5_hash_recursive().

◆ path_fopen()

FILE* path_fopen ( const string &  path,
const string &  mode 
)

Definition at line 890 of file path.cpp.

Referenced by MD5Hash::append_file(), path_read_binary(), and path_write_binary().

◆ path_get()

string path_get ( const string &  sub = "")

Definition at line 338 of file path.cpp.

References cached_path, NULL, path_dirname(), path_join(), and path_specials().

Referenced by device_oneapi_init(), and HdCyclesFileReader::read().

◆ path_init()

CCL_NAMESPACE_BEGIN void path_init ( const string &  path = "",
const string &  user_path = "" 
)

Definition at line 325 of file path.cpp.

References cached_path, and cached_user_path.

Referenced by BLI_path_join(), HdCyclesPlugin::HdCyclesPlugin(), init_func(), and main().

◆ path_is_directory()

bool path_is_directory ( const string &  path)

◆ path_is_relative()

bool path_is_relative ( const string &  path)

Definition at line 442 of file path.cpp.

References DIR_SEP.

Referenced by TEST(), and xml_read_shader_graph().

◆ path_join()

string path_join ( const string &  dir,
const string &  file 
)

◆ path_modified_time()

uint64_t path_modified_time ( const string &  path)

Definition at line 715 of file path.cpp.

References path_stat(), and usdtokens::st().

◆ path_read_binary()

bool path_read_binary ( const string &  path,
vector< uint8_t > &  binary 
)

Definition at line 674 of file path.cpp.

References path_file_size(), and path_fopen().

Referenced by path_read_text().

◆ path_read_text()

bool path_read_text ( const string &  path,
string &  text 
)

◆ path_remove()

bool path_remove ( const string &  path)

◆ path_source_replace_includes()

string path_source_replace_includes ( const string &  source,
const string &  path 
)

Definition at line 883 of file path.cpp.

References path_source_replace_includes_recursive(), and state.

◆ path_user_get()

string path_user_get ( const string &  sub = "")

Definition at line 350 of file path.cpp.

References cached_user_path, path_dirname(), and path_join().

Referenced by path_cache_clear_except(), and path_cache_get().

◆ path_write_binary()

bool path_write_binary ( const string &  path,
const vector< uint8_t > &  binary 
)

Definition at line 648 of file path.cpp.

References path_create_directories(), and path_fopen().

Referenced by path_write_text().

◆ path_write_text()

bool path_write_text ( const string &  path,
string &  text 
)

Definition at line 666 of file path.cpp.

References copy(), and path_write_binary().