Lines Matching full:filepath

30 // Google Test filepath utilities
58 // FilePath - a class for file and directory pathname manipulation which
63 // A FilePath with a value ending in a path separator ("like/this/") represents
69 class GTEST_API_ FilePath {
71 FilePath() : pathname_("") {} in FilePath() function
72 FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) {} in FilePath() function
74 explicit FilePath(const std::string& pathname) : pathname_(pathname) { in FilePath() function
78 FilePath& operator=(const FilePath& rhs) {
83 void Set(const FilePath& rhs) { pathname_ = rhs.pathname_; } in Set()
89 static FilePath GetCurrentDir();
95 static FilePath MakeFileName(const FilePath& directory,
96 const FilePath& base_name, int number,
102 static FilePath ConcatPaths(const FilePath& directory,
103 const FilePath& relative_path);
113 static FilePath GenerateUniqueFileName(const FilePath& directory,
114 const FilePath& base_name,
123 FilePath RemoveTrailingPathSeparator() const;
125 // Returns a copy of the FilePath with the directory part removed.
126 // Example: FilePath("path/to/file").RemoveDirectoryName() returns
127 // FilePath("file"). If there is no directory part ("just_a_file"), it returns
128 // the FilePath unmodified. If there is no file part ("just_a_dir/") it
129 // returns an empty FilePath ("").
131 FilePath RemoveDirectoryName() const;
134 // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
135 // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
136 // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
137 // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
139 FilePath RemoveFileName() const;
141 // Returns a copy of the FilePath with the case-insensitive extension removed.
142 // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
143 // FilePath("dir/file"). If a case-insensitive extension is not
144 // found, returns a copy of the original FilePath.
145 FilePath RemoveExtension(const char* extension) const;
149 // directories for any reason. Will also return false if the FilePath does
159 // Returns true if FilePath describes something in the file-system,
167 // Returns true if FilePath ends with a path separator, which indicates that
191 // but some of the functions in FilePath will not handle that correctly. In
203 // the FilePath. On Windows, for example, both '/' and '\' are valid path
218 }; // class FilePath