40 #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
41 #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
43 #include "gtest/internal/gtest-string.h"
64 FilePath() : pathname_(
"") { }
65 FilePath(
const FilePath& rhs) : pathname_(rhs.pathname_) { }
67 explicit FilePath(
const std::string& pathname) : pathname_(pathname) {
71 FilePath& operator=(
const FilePath& rhs) {
76 void Set(
const FilePath& rhs) {
77 pathname_ = rhs.pathname_;
80 const std::string& string()
const {
return pathname_; }
81 const char* c_str()
const {
return pathname_.c_str(); }
84 static FilePath GetCurrentDir();
90 static FilePath MakeFileName(
const FilePath& directory,
91 const FilePath& base_name,
93 const char* extension);
98 static FilePath ConcatPaths(
const FilePath& directory,
99 const FilePath& relative_path);
109 static FilePath GenerateUniqueFileName(
const FilePath& directory,
110 const FilePath& base_name,
111 const char* extension);
114 bool IsEmpty()
const {
return pathname_.empty(); }
119 FilePath RemoveTrailingPathSeparator()
const;
127 FilePath RemoveDirectoryName()
const;
135 FilePath RemoveFileName()
const;
141 FilePath RemoveExtension(
const char* extension)
const;
147 bool CreateDirectoriesRecursively()
const;
153 bool CreateFolder()
const;
157 bool FileOrDirectoryExists()
const;
161 bool DirectoryExists()
const;
166 bool IsDirectory()
const;
170 bool IsRootDirectory()
const;
173 bool IsAbsolutePath()
const;
201 const char* FindLastPathSeparator()
const;
203 std::string pathname_;
#define GTEST_API_
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:775
#define GTEST_DISABLE_MSC_WARNINGS_POP_()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:324
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251) namespace testing
Definition: cmake-build-release/googletest-src/googletest/include/gtest/internal/gtest-filepath.h:45
Definition: cmake-build-debug/googletest-src/googlemock/include/gmock/gmock-actions.h:154