diff options
Diffstat (limited to 'intern/cycles/util/util_path.cpp')
-rw-r--r-- | intern/cycles/util/util_path.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp index 6f76e378dc2..086063bcb81 100644 --- a/intern/cycles/util/util_path.cpp +++ b/intern/cycles/util/util_path.cpp @@ -27,6 +27,7 @@ OIIO_NAMESPACE_USING #define BOOST_FILESYSTEM_VERSION 2 #include <boost/filesystem.hpp> +#include <boost/algorithm/string.hpp> CCL_NAMESPACE_BEGIN @@ -60,6 +61,18 @@ string path_join(const string& dir, const string& file) return (boost::filesystem::path(dir) / boost::filesystem::path(file)).string(); } +string path_escape(const string& path) +{ + string result = path; + boost::replace_all(result, " ", "\\ "); + return result; +} + +bool path_exists(const string& path) +{ + return boost::filesystem::exists(path); +} + string path_files_md5_hash(const string& dir) { /* computes md5 hash of all files in the directory */ |