Lines Matching refs:FilePath

48 // FilePath - a class for file and directory pathname manipulation which
53 // A FilePath with a value ending in a path separator ("like/this/") represents
59 class GTEST_API_ FilePath {
61 FilePath() : pathname_("") { }
62 FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }
64 explicit FilePath(const std::string& pathname) : pathname_(pathname) {
68 FilePath& operator=(const FilePath& rhs) {
73 void Set(const FilePath& rhs) {
81 static FilePath GetCurrentDir();
87 static FilePath MakeFileName(const FilePath& directory,
88 const FilePath& base_name,
95 static FilePath ConcatPaths(const FilePath& directory,
96 const FilePath& relative_path);
106 static FilePath GenerateUniqueFileName(const FilePath& directory,
107 const FilePath& base_name,
116 FilePath RemoveTrailingPathSeparator() const;
118 // Returns a copy of the FilePath with the directory part removed.
119 // Example: FilePath("path/to/file").RemoveDirectoryName() returns
120 // FilePath("file"). If there is no directory part ("just_a_file"), it returns
121 // the FilePath unmodified. If there is no file part ("just_a_dir/") it
122 // returns an empty FilePath ("").
124 FilePath RemoveDirectoryName() const;
127 // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
128 // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
129 // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
130 // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
132 FilePath RemoveFileName() const;
134 // Returns a copy of the FilePath with the case-insensitive extension removed.
135 // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
136 // FilePath("dir/file"). If a case-insensitive extension is not
137 // found, returns a copy of the original FilePath.
138 FilePath RemoveExtension(const char* extension) const;
142 // directories for any reason. Will also return false if the FilePath does
152 // Returns true if FilePath describes something in the file-system,
160 // Returns true if FilePath ends with a path separator, which indicates that
184 // but some of the functions in FilePath will not handle that correctly. In
196 // the FilePath. On Windows, for example, both '/' and '\' are valid path
201 }; // class FilePath