40 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
41 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_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_;
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;
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251) namespace testing
#define GTEST_DISABLE_MSC_WARNINGS_POP_()