Blender V2.61 - r43446
Defines | Functions | Variables

util_path.cpp File Reference

#include "util_debug.h"
#include "util_md5.h"
#include "util_path.h"
#include "util_string.h"
#include <OpenImageIO/sysutil.h>
#include <stdio.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>

Go to the source code of this file.

Defines

#define BOOST_FILESYSTEM_VERSION   2

Functions

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_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_exists (const string &path)
static void path_files_md5_hash_recursive (MD5Hash &hash, const string &dir)
string path_files_md5_hash (const string &dir)
void path_create_directories (const string &path)
bool path_write_binary (const string &path, const vector< uint8_t > &binary)
bool path_read_binary (const string &path, vector< uint8_t > &binary)
static bool path_read_text (const string &path, string &text)
string path_source_replace_includes (const string &source_, const string &path)

Variables

static CCL_NAMESPACE_BEGIN string cached_path = ""
static string cached_user_path = ""

Define Documentation

#define BOOST_FILESYSTEM_VERSION   2

Definition at line 29 of file util_path.cpp.


Function Documentation

void path_create_directories ( const string &  path)

Definition at line 117 of file util_path.cpp.

References path_dirname().

Referenced by CUDADevice::compile_kernel(), Cache::insert(), and path_write_binary().

string path_dirname ( const string &  path)
string path_escape ( const string &  path)

Definition at line 76 of file util_path.cpp.

bool path_exists ( const string &  path)

Definition at line 83 of file util_path.cpp.

Referenced by CUDADevice::compile_kernel(), cuCompilerPath(), and path_read_text().

string path_filename ( const string &  path)

Definition at line 61 of file util_path.cpp.

Referenced by ImageManager::device_update(), main(), and xml_read_file().

string path_files_md5_hash ( const string &  dir)

Definition at line 107 of file util_path.cpp.

References MD5Hash::get_hex(), hash, and path_files_md5_hash_recursive().

Referenced by CUDADevice::compile_kernel().

static void path_files_md5_hash_recursive ( MD5Hash hash,
const string &  dir 
) [static]

Definition at line 88 of file util_path.cpp.

References MD5Hash::append(), and MD5Hash::append_file().

Referenced by path_files_md5_hash().

string path_get ( const string &  sub)

Definition at line 45 of file util_path.cpp.

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

Referenced by CUDADevice::compile_kernel().

void path_init ( const string &  path,
const string &  user_path 
)

Definition at line 39 of file util_path.cpp.

References cached_path, and cached_user_path.

Referenced by init_func(), and main().

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

Definition at line 140 of file util_path.cpp.

Referenced by path_read_text().

static bool path_read_text ( const string &  path,
string &  text 
) [static]

Definition at line 165 of file util_path.cpp.

References path_exists(), path_read_binary(), size(), and str.

Referenced by path_source_replace_includes().

string path_source_replace_includes ( const string &  source_,
const string &  path 
)
string path_user_get ( const string &  sub)
bool path_write_binary ( const string &  path,
const vector< uint8_t > &  binary 
)

Definition at line 122 of file util_path.cpp.

References path_create_directories().


Variable Documentation

CCL_NAMESPACE_BEGIN string cached_path = "" [static]

Definition at line 36 of file util_path.cpp.

Referenced by path_get(), and path_init().

string cached_user_path = "" [static]

Definition at line 37 of file util_path.cpp.

Referenced by path_init(), and path_user_get().