summaryrefslogtreecommitdiffstats
path: root/base/file_path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_path.cc')
-rw-r--r--base/file_path.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/file_path.cc b/base/file_path.cc
index 45f6e327..7cfe952 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -63,6 +63,15 @@ bool IsPathAbsolute(const FilePath::StringType& path) {
} // namespace
+const std::string FilePath::UTF8Value() const {
+#if defined(OS_POSIX)
+ // TODO(erikkay): I'm not sure how to make this code always correct for Linux.
+ return path_;
+#elif defined(OS_WIN)
+ return WideToUTF8(path_);
+#endif
+}
+
bool FilePath::IsSeparator(CharType character) {
for (size_t i = 0; i < arraysize(kSeparators) - 1; ++i) {
if (character == kSeparators[i]) {