CHROMA
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
testing::internal::FilePath Class Reference

#include <gtest.h>

Public Member Functions

 FilePath ()
 
 FilePath (const FilePath &rhs)
 
 FilePath (const std::string &pathname)
 
FilePathoperator= (const FilePath &rhs)
 
void Set (const FilePath &rhs)
 
const std::string & string () const
 
const char * c_str () const
 
bool IsEmpty () const
 
FilePath RemoveTrailingPathSeparator () const
 
FilePath RemoveDirectoryName () const
 
FilePath RemoveFileName () const
 
FilePath RemoveExtension (const char *extension) const
 
bool CreateDirectoriesRecursively () const
 
bool CreateFolder () const
 
bool FileOrDirectoryExists () const
 
bool DirectoryExists () const
 
bool IsDirectory () const
 
bool IsRootDirectory () const
 
bool IsAbsolutePath () const
 

Static Public Member Functions

static FilePath GetCurrentDir ()
 
static FilePath MakeFileName (const FilePath &directory, const FilePath &base_name, int number, const char *extension)
 
static FilePath ConcatPaths (const FilePath &directory, const FilePath &relative_path)
 
static FilePath GenerateUniqueFileName (const FilePath &directory, const FilePath &base_name, const char *extension)
 

Private Member Functions

void Normalize ()
 
const char * FindLastPathSeparator () const
 

Private Attributes

std::string pathname_
 

Detailed Description

Definition at line 3546 of file gtest.h.

Constructor & Destructor Documentation

◆ FilePath() [1/3]

testing::internal::FilePath::FilePath ( )
inline

◆ FilePath() [2/3]

testing::internal::FilePath::FilePath ( const FilePath rhs)
inline

Definition at line 3549 of file gtest.h.

◆ FilePath() [3/3]

testing::internal::FilePath::FilePath ( const std::string &  pathname)
inlineexplicit

Definition at line 3551 of file gtest.h.

Member Function Documentation

◆ c_str()

const char* testing::internal::FilePath::c_str ( ) const
inline

◆ ConcatPaths()

FilePath testing::internal::FilePath::ConcatPaths ( const FilePath directory,
const FilePath relative_path 
)
static

◆ CreateDirectoriesRecursively()

bool testing::internal::FilePath::CreateDirectoriesRecursively ( ) const

◆ CreateFolder()

bool testing::internal::FilePath::CreateFolder ( ) const

◆ DirectoryExists()

bool testing::internal::FilePath::DirectoryExists ( ) const

◆ FileOrDirectoryExists()

bool testing::internal::FilePath::FileOrDirectoryExists ( ) const

Definition at line 8038 of file gtest-all.cc.

References pathname_, and testing::internal::posix::Stat().

Referenced by GenerateUniqueFileName().

◆ FindLastPathSeparator()

const char * testing::internal::FilePath::FindLastPathSeparator ( ) const
private

Definition at line 7965 of file gtest-all.cc.

References c_str(), and testing::internal::kPathSeparator.

Referenced by RemoveDirectoryName(), and RemoveFileName().

◆ GenerateUniqueFileName()

FilePath testing::internal::FilePath::GenerateUniqueFileName ( const FilePath directory,
const FilePath base_name,
const char *  extension 
)
static

◆ GetCurrentDir()

FilePath testing::internal::FilePath::GetCurrentDir ( )
static

◆ IsAbsolutePath()

bool testing::internal::FilePath::IsAbsolutePath ( ) const

◆ IsDirectory()

bool testing::internal::FilePath::IsDirectory ( ) const

◆ IsEmpty()

bool testing::internal::FilePath::IsEmpty ( ) const
inline

Definition at line 3598 of file gtest.h.

Referenced by ConcatPaths().

◆ IsRootDirectory()

bool testing::internal::FilePath::IsRootDirectory ( ) const

Definition at line 8082 of file gtest-all.cc.

References IsAbsolutePath(), testing::internal::IsPathSeparator(), and pathname_.

Referenced by DirectoryExists().

◆ MakeFileName()

FilePath testing::internal::FilePath::MakeFileName ( const FilePath directory,
const FilePath base_name,
int  number,
const char *  extension 
)
static

◆ Normalize()

void testing::internal::FilePath::Normalize ( )
private

◆ operator=()

FilePath& testing::internal::FilePath::operator= ( const FilePath rhs)
inline

Definition at line 3555 of file gtest.h.

◆ RemoveDirectoryName()

FilePath testing::internal::FilePath::RemoveDirectoryName ( ) const

Definition at line 7984 of file gtest-all.cc.

References FilePath(), and FindLastPathSeparator().

Referenced by testing::internal::GetCurrentExecutableName().

◆ RemoveExtension()

FilePath testing::internal::FilePath::RemoveExtension ( const char *  extension) const

◆ RemoveFileName()

FilePath testing::internal::FilePath::RemoveFileName ( ) const

◆ RemoveTrailingPathSeparator()

FilePath testing::internal::FilePath::RemoveTrailingPathSeparator ( ) const

◆ Set()

void testing::internal::FilePath::Set ( const FilePath rhs)
inline

Definition at line 3560 of file gtest.h.

References pathname_.

Referenced by GenerateUniqueFileName(), and testing::internal::GetCurrentExecutableName().

◆ string()

const std::string& testing::internal::FilePath::string ( ) const
inline

Member Data Documentation

◆ pathname_

std::string testing::internal::FilePath::pathname_
private

The documentation for this class was generated from the following files: