aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-filepath.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gtest/internal/gtest-filepath.h')
-rw-r--r--include/gtest/internal/gtest-filepath.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-filepath.h b/include/gtest/internal/gtest-filepath.h
index 308a2c64..fecdddcc 100644
--- a/include/gtest/internal/gtest-filepath.h
+++ b/include/gtest/internal/gtest-filepath.h
@@ -70,6 +70,9 @@ class FilePath {
String ToString() const { return pathname_; }
const char* c_str() const { return pathname_.c_str(); }
+ // Returns the current working directory, or "" if unsuccessful.
+ static FilePath GetCurrentDir();
+
// Given directory = "dir", base_name = "test", number = 0,
// extension = "xml", returns "dir/test.xml". If number is greater
// than zero (e.g., 12), returns "dir/test_12.xml".
@@ -91,6 +94,9 @@ class FilePath {
const FilePath& base_name,
const char* extension);
+ // Returns true iff the path is NULL or "".
+ bool IsEmpty() const { return c_str() == NULL || *c_str() == '\0'; }
+
// If input name has a trailing separator character, removes it and returns
// the name, otherwise return the name string unmodified.
// On Windows platform, uses \ as the separator, other platforms use /.