Fawkes API  Fawkes Development Version
fawkes::PathParser Class Reference

Path parser. More...

#include <>>

Inheritance diagram for fawkes::PathParser:

Public Member Functions

 PathParser (std::string &path)
 Constructor (C++ string). More...
 
 PathParser (const char *path)
 Constructor (C string). More...
 
void print_debug ()
 Debug print to stdout. More...
 
std::string path_as_string ()
 Get path as string. More...
 
bool is_absolute () const
 Check if path is absolute. More...
 

Detailed Description

Path parser.

Parses a given (Unix) file system path and provides the elements and vector elements.

Author
Tim Niemueller

Definition at line 32 of file pathparser.h.

Constructor & Destructor Documentation

◆ PathParser() [1/2]

fawkes::PathParser::PathParser ( std::string &  path)

Constructor (C++ string).

Parameters
pathpath to parse

Definition at line 44 of file pathparser.cpp.

◆ PathParser() [2/2]

fawkes::PathParser::PathParser ( const char *  path)

Constructor (C string).

Parameters
pathpath to parse

Definition at line 53 of file pathparser.cpp.

Member Function Documentation

◆ is_absolute()

bool fawkes::PathParser::is_absolute ( ) const

Check if path is absolute.

Returns
true if path is absolute, false otherwise

Definition at line 123 of file pathparser.cpp.

◆ path_as_string()

std::string fawkes::PathParser::path_as_string ( )

Get path as string.

Joins the path elements to one path again.

Returns
path as string

Definition at line 101 of file pathparser.cpp.

◆ print_debug()

void fawkes::PathParser::print_debug ( )

Debug print to stdout.

Definition at line 89 of file pathparser.cpp.


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