|
Blender
V2.93
|
#include "util/util_path.h"#include "util/util_md5.h"#include "util/util_string.h"#include <OpenImageIO/filesystem.h>#include <OpenImageIO/strutil.h>#include <OpenImageIO/sysutil.h>#include <stdio.h>#include <sys/stat.h>#include <dirent.h>#include <pwd.h>#include <sys/types.h>#include <unistd.h>#include "util/util_map.h"#include "util/util_windows.h"Go to the source code of this file.
Classes | |
| struct | SourceReplaceState |
Macros | |
| #define | DIR_SEP '/' |
Typedefs | |
| typedef typedefCCL_NAMESPACE_BEGIN struct stat | path_stat_t |
Functions | |
| static char * | path_specials (const string &sub) |
| 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) |
| static int | path_stat (const string &path, path_stat_t *st) |
| size_t | path_file_size (const string &path) |
| bool | path_exists (const string &path) |
| bool | path_is_directory (const string &path) |
| static void | path_files_md5_hash_recursive (MD5Hash &hash, const string &dir) |
| string | path_files_md5_hash (const string &dir) |
| static bool | create_directories_recursivey (const string &path) |
| void | path_create_directories (const string &filepath) |
| 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) |
| uint64_t | path_modified_time (const string &path) |
| bool | path_remove (const string &path) |
| static string | path_source_replace_includes_recursive (const string &source, const string &source_filepath, SourceReplaceState *state) |
| static string | line_directive (const SourceReplaceState &state, const string &path, const int line) |
| static string | path_source_handle_preprocessor (const string &preprocessor_line, const string &source_filepath, const size_t line_number, SourceReplaceState *state) |
| string | path_source_replace_includes (const string &source, const string &path, const string &source_filename) |
| FILE * | path_fopen (const string &path, const string &mode) |
| void | path_cache_clear_except (const string &name, const set< string > &except) |
Variables | |
| static string | cached_path = "" |
| static string | cached_user_path = "" |
| static string | cached_xdg_cache_path = "" |
| #define DIR_SEP '/' |
Definition at line 36 of file util_path.cpp.
| typedef typedefCCL_NAMESPACE_BEGIN struct stat path_stat_t |
Definition at line 50 of file util_path.cpp.
|
static |
Definition at line 629 of file util_path.cpp.
References path_dirname(), path_exists(), and path_is_directory().
Referenced by path_create_directories().
|
static |
Definition at line 758 of file util_path.cpp.
References length(), NULL, path_filename(), state, string_printf(), and string_startswith().
Referenced by path_source_handle_preprocessor().
| void path_cache_clear_except | ( | const string & | name, |
| const set< string > & | except | ||
| ) |
Definition at line 924 of file util_path.cpp.
References path_exists(), path_filename(), path_remove(), path_user_get(), and string_startswith().
| string path_cache_get | ( | const string & | sub | ) |
Definition at line 371 of file util_path.cpp.
References cached_xdg_cache_path, path_join(), path_user_get(), and result.
| void path_create_directories | ( | const string & | filepath | ) |
Definition at line 655 of file util_path.cpp.
References create_directories_recursivey(), and path_dirname().
Referenced by path_write_binary().
| string path_dirname | ( | const string & | path | ) |
Definition at line 412 of file util_path.cpp.
References DIR_SEP.
Referenced by blender_absolute_path(), create_directories_recursivey(), path_create_directories(), path_get(), path_source_handle_preprocessor(), path_user_get(), TEST(), xml_read_file(), and xml_read_include().
| string path_escape | ( | const string & | path | ) |
Definition at line 448 of file util_path.cpp.
References result, and string_replace().
Referenced by TEST().
| bool path_exists | ( | const string & | path | ) |
Definition at line 572 of file util_path.cpp.
Referenced by create_directories_recursivey(), OIIOImageLoader::load_metadata(), OIIOImageLoader::load_pixels(), path_cache_clear_except(), path_files_md5_hash_recursive(), path_read_text(), and path_source_handle_preprocessor().
| size_t path_file_size | ( | const string & | path | ) |
Definition at line 563 of file util_path.cpp.
References path_stat().
Referenced by path_read_binary().
| string path_filename | ( | const string & | path | ) |
Definition at line 389 of file util_path.cpp.
References DIR_SEP.
Referenced by line_directive(), main(), OIIOImageLoader::name(), path_cache_clear_except(), TEST(), and xml_read_file().
| string path_files_md5_hash | ( | const string & | dir | ) |
Definition at line 619 of file util_path.cpp.
References hash, and path_files_md5_hash_recursive().
|
static |
Definition at line 600 of file util_path.cpp.
References hash, path_exists(), and path_is_directory().
Referenced by path_files_md5_hash().
| FILE* path_fopen | ( | const string & | path, |
| const string & | mode | ||
| ) |
Definition at line 913 of file util_path.cpp.
Referenced by MD5Hash::append_file(), path_read_binary(), and path_write_binary().
| string path_get | ( | const string & | sub | ) |
Definition at line 351 of file util_path.cpp.
References cached_path, NULL, path_dirname(), path_join(), and path_specials().
| void path_init | ( | const string & | path, |
| const string & | user_path | ||
| ) |
Definition at line 338 of file util_path.cpp.
References cached_path, and cached_user_path.
Referenced by BLI_path_join(), CPUDevice::CPUDevice(), init_func(), DeviceSplitKernel::load_kernels(), main(), and DeviceSplitKernel::path_trace().
| bool path_is_directory | ( | const string & | path | ) |
Definition at line 591 of file util_path.cpp.
References path_stat(), and S_ISDIR.
Referenced by create_directories_recursivey(), OIIOImageLoader::load_metadata(), OIIOImageLoader::load_pixels(), and path_files_md5_hash_recursive().
| bool path_is_relative | ( | const string & | path | ) |
Definition at line 455 of file util_path.cpp.
References DIR_SEP.
Referenced by TEST(), and xml_read_shader_graph().
| string path_join | ( | const string & | dir, |
| const string & | file | ||
| ) |
Definition at line 426 of file util_path.cpp.
References DIR_SEP, file, and result.
Referenced by blender_absolute_path(), path_cache_get(), path_get(), path_source_handle_preprocessor(), path_source_replace_includes(), path_user_get(), TEST(), xml_read_include(), and xml_read_shader_graph().
| uint64_t path_modified_time | ( | const string & | path | ) |
Definition at line 728 of file util_path.cpp.
References path_stat().
Definition at line 687 of file util_path.cpp.
References path_file_size(), and path_fopen().
Referenced by path_read_text().
| bool path_read_text | ( | const string & | path, |
| string & | text | ||
| ) |
Definition at line 714 of file util_path.cpp.
References path_exists(), path_read_binary(), size(), and str.
Referenced by LightManager::add_ies_from_file(), and path_source_handle_preprocessor().
| bool path_remove | ( | const string & | path | ) |
Definition at line 737 of file util_path.cpp.
Referenced by path_cache_clear_except().
|
static |
Definition at line 784 of file util_path.cpp.
References line_directive(), path_dirname(), path_exists(), path_join(), path_read_text(), path_source_replace_includes_recursive(), result, state, string_endswith(), string_startswith(), and string_strip().
Referenced by path_source_replace_includes_recursive().
| string path_source_replace_includes | ( | const string & | source, |
| const string & | path, | ||
| const string & | source_filename | ||
| ) |
Definition at line 904 of file util_path.cpp.
References path_join(), path_source_replace_includes_recursive(), and state.
|
static |
Definition at line 821 of file util_path.cpp.
References path_source_handle_preprocessor(), result, and state.
Referenced by path_source_handle_preprocessor(), and path_source_replace_includes().
|
static |
|
static |
Definition at line 557 of file util_path.cpp.
Referenced by path_file_size(), path_is_directory(), and path_modified_time().
| string path_user_get | ( | const string & | sub | ) |
Definition at line 363 of file util_path.cpp.
References cached_user_path, path_dirname(), and path_join().
Referenced by path_cache_clear_except(), and path_cache_get().
Definition at line 661 of file util_path.cpp.
References path_create_directories(), and path_fopen().
Referenced by path_write_text().
| bool path_write_text | ( | const string & | path, |
| string & | text | ||
| ) |
Definition at line 679 of file util_path.cpp.
References copy(), and path_write_binary().
|
static |
Definition at line 67 of file util_path.cpp.
Referenced by path_get(), and path_init().
|
static |
Definition at line 68 of file util_path.cpp.
Referenced by path_init(), and path_user_get().
|
static |
Definition at line 69 of file util_path.cpp.
Referenced by path_cache_get().