Lines Matching refs:FilePath
824 GTEST_API_ FilePath GetCurrentExecutableName();
1075 original_working_dir_.Set(FilePath::GetCurrentDir());
1236 internal::FilePath original_working_dir_;
1877 FilePath GetCurrentExecutableName() {
1878 FilePath result;
1881 result.Set(FilePath(g_executable_path).RemoveExtension("exe"));
1883 result.Set(FilePath(g_executable_path));
1911 return internal::FilePath::ConcatPaths(
1912 internal::FilePath(
1914 internal::FilePath(kDefaultOutputFile)).string();
1916 internal::FilePath output_name(colon + 1);
1922 output_name = internal::FilePath::ConcatPaths(
1923 internal::FilePath(UnitTest::GetInstance()->original_working_dir()),
1924 internal::FilePath(colon + 1));
1929 internal::FilePath result(internal::FilePath::GenerateUniqueFileName(
4606 FilePath output_file(output_file_);
4607 FilePath output_dir(output_file.RemoveFileName());
7976 FilePath FilePath::GetCurrentDir() {
7980 return FilePath(kCurrentDirectoryString);
7983 return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
7986 return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
7990 // Returns a copy of the FilePath with the case-insensitive extension removed.
7991 // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
7992 // FilePath("dir/file"). If a case-insensitive extension is not
7993 // found, returns a copy of the original FilePath.
7994 FilePath FilePath::RemoveExtension(const char* extension) const {
7997 return FilePath(pathname_.substr(
8004 // the FilePath. On Windows, for example, both '/' and '\' are valid path
8006 const char* FilePath::FindLastPathSeparator() const {
8019 // Returns a copy of the FilePath with the directory part removed.
8020 // Example: FilePath("path/to/file").RemoveDirectoryName() returns
8021 // FilePath("file"). If there is no directory part ("just_a_file"), it returns
8022 // the FilePath unmodified. If there is no file part ("just_a_dir/") it
8023 // returns an empty FilePath ("").
8025 FilePath FilePath::RemoveDirectoryName() const {
8027 return last_sep ? FilePath(last_sep + 1) : *this;
8031 // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
8032 // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
8033 // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
8034 // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
8036 FilePath FilePath::RemoveFileName() const {
8044 return FilePath(dir);
8053 FilePath FilePath::MakeFileName(const FilePath& directory,
8054 const FilePath& base_name,
8064 return ConcatPaths(directory, FilePath(file));
8069 FilePath FilePath::ConcatPaths(const FilePath& directory,
8070 const FilePath& relative_path) {
8073 const FilePath dir(directory.RemoveTrailingPathSeparator());
8074 return FilePath(dir.string() + kPathSeparator + relative_path.string());
8079 bool FilePath::FileOrDirectoryExists() const {
8093 bool FilePath::DirectoryExists() const {
8098 const FilePath& path(IsRootDirectory() ? *this :
8101 const FilePath& path(*this);
8123 bool FilePath::IsRootDirectory() const {
8135 bool FilePath::IsAbsolutePath() const {
8156 FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
8157 const FilePath& base_name,
8159 FilePath full_pathname;
8167 // Returns true if FilePath ends with a path separator, which indicates that
8170 bool FilePath::IsDirectory() const {
8178 bool FilePath::CreateDirectoriesRecursively() const {
8187 const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName());
8195 bool FilePath::CreateFolder() const {
8197 FilePath removed_sep(this->RemoveTrailingPathSeparator());
8216 FilePath FilePath::RemoveTrailingPathSeparator() const {
8218 ? FilePath(pathname_.substr(0, pathname_.length() - 1))
8226 void FilePath::Normalize() {