RLLib  0.1
Public Member Functions | Public Attributes | List of all members
rl::FilePath Struct Reference

Structure containing a normalized file path. More...

#include <FilePath.hpp>

Public Member Functions

 FilePath ()=default
 Creates an empty file path.
 
 FilePath (std::string dir, std::string name)
 Creates a file path. More...
 
 FilePath (const std::string &path)
 Creates a file path. More...
 
 FilePath (const char *path)
 Creates a file path. More...
 
 operator std::string () const
 Converts the file path into a string. More...
 
bool operator== (const FilePath &other) const noexcept
 Compares the file path with another one. More...
 

Public Attributes

std::string directory
 The directory of the file.
 
std::string filename
 The name of the file.
 

Detailed Description

Structure containing a normalized file path.

Constructor & Destructor Documentation

◆ FilePath() [1/3]

rl::FilePath::FilePath ( std::string  dir,
std::string  name 
)

Creates a file path.

Parameters
dirThe directory of the file
nameThe name of the file

◆ FilePath() [2/3]

rl::FilePath::FilePath ( const std::string &  path)

Creates a file path.

Parameters
pathThe full path of the file

◆ FilePath() [3/3]

rl::FilePath::FilePath ( const char *  path)

Creates a file path.

Parameters
pathThe full path of the file

Member Function Documentation

◆ operator std::string()

rl::FilePath::operator std::string ( ) const

Converts the file path into a string.

Returns
A string containing the directory and the filename

◆ operator==()

bool rl::FilePath::operator== ( const FilePath other) const
noexcept

Compares the file path with another one.

Parameters
otherThe other file path
Returns
true if both paths are the same, false if not

The documentation for this struct was generated from the following file: