MySQL 8.3.0
Source Code Documentation
Path Class Reference

A helper class for handling file paths. More...

#include <path.h>

Public Member Functions

 Path ()
 
 Path (const std::string &s)
 
 Path (const Path &p)
 
bool path_getcwd ()
 
void trim ()
 
void parent_directory (Path *out)
 
Pathup ()
 
Pathappend (const std::string &path)
 
Pathfilename_append (const std::string &ext)
 
void path (const std::string &p)
 
void filename (const std::string &f)
 
void path (const Path &p)
 
void filename (const Path &p)
 
bool qpath (const std::string &qp)
 
bool normalize_path ()
 
bool is_qualified_path ()
 
bool exists ()
 
const std::string to_str ()
 
bool empty ()
 
void get_homedir ()
 

Private Attributes

std::string m_path
 
std::string m_filename
 

Friends

std::ostream & operator<< (std::ostream &op, const Path &p)
 

Detailed Description

A helper class for handling file paths.

The class can handle the memory on its own or it can wrap an external string.

Note
This is a rather trivial wrapper which doesn't handle malformed paths or filenames very well.
See also
unittest/gunit/path-t.cc

Constructor & Destructor Documentation

◆ Path() [1/3]

Path::Path ( )
default

◆ Path() [2/3]

Path::Path ( const std::string &  s)

◆ Path() [3/3]

Path::Path ( const Path p)

Member Function Documentation

◆ append()

Path & Path::append ( const std::string &  path)

◆ empty()

bool Path::empty ( )

◆ exists()

bool Path::exists ( )

◆ filename() [1/2]

void Path::filename ( const Path p)

◆ filename() [2/2]

void Path::filename ( const std::string &  f)

◆ filename_append()

Path & Path::filename_append ( const std::string &  ext)

◆ get_homedir()

void Path::get_homedir ( )

◆ is_qualified_path()

bool Path::is_qualified_path ( )

◆ normalize_path()

bool Path::normalize_path ( )

◆ parent_directory()

void Path::parent_directory ( Path out)

◆ path() [1/2]

void Path::path ( const Path p)

◆ path() [2/2]

void Path::path ( const std::string &  p)

◆ path_getcwd()

bool Path::path_getcwd ( )

◆ qpath()

bool Path::qpath ( const std::string &  qp)

◆ to_str()

const std::string Path::to_str ( )

◆ trim()

void Path::trim ( )

◆ up()

Path & Path::up ( )

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  op,
const Path p 
)
friend

Member Data Documentation

◆ m_filename

std::string Path::m_filename
private

◆ m_path

std::string Path::m_path
private

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