diff options
Diffstat (limited to 'o3d/utils')
-rw-r--r-- | o3d/utils/cross/file_path_utils.cc | 8 | ||||
-rw-r--r-- | o3d/utils/cross/file_path_utils.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/o3d/utils/cross/file_path_utils.cc b/o3d/utils/cross/file_path_utils.cc index bea30de..257ac0c 100644 --- a/o3d/utils/cross/file_path_utils.cc +++ b/o3d/utils/cross/file_path_utils.cc @@ -71,6 +71,14 @@ FilePath UTF8ToFilePath(const String& input) { #endif } +FilePath::StringType UTF8ToFilePathStringType(const String& input) { +#if defined(OS_WIN) + return UTF8ToWide(input); +#else + return input; +#endif +} + bool AbsolutePath(FilePath* absolute_path) { #if defined(OS_WIN) return file_util::AbsolutePath(absolute_path); diff --git a/o3d/utils/cross/file_path_utils.h b/o3d/utils/cross/file_path_utils.h index 7398e8b..463b47de 100644 --- a/o3d/utils/cross/file_path_utils.h +++ b/o3d/utils/cross/file_path_utils.h @@ -49,6 +49,7 @@ std::wstring FilePathToWide(const FilePath& input); FilePath WideToFilePath(const std::wstring& input); String FilePathToUTF8(const FilePath& input); FilePath UTF8ToFilePath(const String& input); +FilePath::StringType UTF8ToFilePathStringType(const String& input); // On Windows, this is just the same as file_util::AbsolutePath. // On the Posix implementation of file_util::AbsolutePath, |