DotNameLib
Loading...
Searching...
No Matches
dotnamecpp::utils::PathResolver Class Referencefinal

#include <PathResolver.hpp>

Inheritance diagram for dotnamecpp::utils::PathResolver:
Collaboration diagram for dotnamecpp::utils::PathResolver:

Public Member Functions

 PathResolver ()=default
 PathResolver (const PathResolver &)=delete
PathResolveroperator= (const PathResolver &)=delete
 PathResolver (PathResolver &&)=delete
PathResolveroperator= (PathResolver &&)=delete
 ~PathResolver () override=default
Result< std::filesystem::path, FileErrorgetAbsolutePath (const std::filesystem::path &path) const override
 Get the Absolute Path object.
Result< std::filesystem::path, FileErrorgetCanonicalPath (const std::filesystem::path &path) const override
 Get the Canonical Path object.
Result< std::filesystem::path, FileErrorgetRelativePath (const std::filesystem::path &target, const std::filesystem::path &base) const override
 Get the Relative Path object.
bool isAbsolute (const std::filesystem::path &path) const override
 Check if path is absolute.
bool isRelative (const std::filesystem::path &path) const override
 Check if path is relative.
std::filesystem::path getParent (const std::filesystem::path &path) const override
 Get the Parent object.
std::string getFilename (const std::filesystem::path &path) const override
 Get the Filename object.
std::string getExtension (const std::filesystem::path &path) const override
 Get the Extension object.
std::string getStem (const std::filesystem::path &path) const override
 Get the Stem object.
std::filesystem::path join (const std::vector< std::string > &parts) const override
 Join multiple path components.
Public Member Functions inherited from dotnamecpp::utils::IPathResolver
virtual ~IPathResolver ()=default

Constructor & Destructor Documentation

◆ PathResolver() [1/3]

dotnamecpp::utils::PathResolver::PathResolver ( )
default
Here is the caller graph for this function:

◆ PathResolver() [2/3]

dotnamecpp::utils::PathResolver::PathResolver ( const PathResolver & )
delete
Here is the call graph for this function:

◆ PathResolver() [3/3]

dotnamecpp::utils::PathResolver::PathResolver ( PathResolver && )
delete
Here is the call graph for this function:

◆ ~PathResolver()

dotnamecpp::utils::PathResolver::~PathResolver ( )
overridedefault

Member Function Documentation

◆ getAbsolutePath()

Result< std::filesystem::path, FileError > dotnamecpp::utils::PathResolver::getAbsolutePath ( const std::filesystem::path & path) const
nodiscardoverridevirtual

Get the Absolute Path object.

Parameters
path
Returns
Result<std::filesystem::path, FileError>

Implements dotnamecpp::utils::IPathResolver.

◆ getCanonicalPath()

Result< std::filesystem::path, FileError > dotnamecpp::utils::PathResolver::getCanonicalPath ( const std::filesystem::path & path) const
nodiscardoverridevirtual

Get the Canonical Path object.

Parameters
path
Returns
Result<std::filesystem::path, FileError>

Implements dotnamecpp::utils::IPathResolver.

◆ getExtension()

std::string dotnamecpp::utils::PathResolver::getExtension ( const std::filesystem::path & path) const
nodiscardoverridevirtual

Get the Extension object.

Parameters
path
Returns
std::string

Implements dotnamecpp::utils::IPathResolver.

◆ getFilename()

std::string dotnamecpp::utils::PathResolver::getFilename ( const std::filesystem::path & path) const
nodiscardoverridevirtual

Get the Filename object.

Parameters
path
Returns
std::string

Implements dotnamecpp::utils::IPathResolver.

◆ getParent()

std::filesystem::path dotnamecpp::utils::PathResolver::getParent ( const std::filesystem::path & path) const
nodiscardoverridevirtual

Get the Parent object.

Parameters
path
Returns
std::filesystem::path

Implements dotnamecpp::utils::IPathResolver.

◆ getRelativePath()

Result< std::filesystem::path, FileError > dotnamecpp::utils::PathResolver::getRelativePath ( const std::filesystem::path & target,
const std::filesystem::path & base ) const
nodiscardoverridevirtual

Get the Relative Path object.

Parameters
target
base
Returns
Result<std::filesystem::path, FileError>

Implements dotnamecpp::utils::IPathResolver.

◆ getStem()

std::string dotnamecpp::utils::PathResolver::getStem ( const std::filesystem::path & path) const
nodiscardoverridevirtual

Get the Stem object.

Parameters
path
Returns
std::string

Implements dotnamecpp::utils::IPathResolver.

◆ isAbsolute()

bool dotnamecpp::utils::PathResolver::isAbsolute ( const std::filesystem::path & path) const
nodiscardoverridevirtual

Check if path is absolute.

Parameters
path
Returns
true
false

Implements dotnamecpp::utils::IPathResolver.

◆ isRelative()

bool dotnamecpp::utils::PathResolver::isRelative ( const std::filesystem::path & path) const
nodiscardoverridevirtual

Check if path is relative.

Parameters
path
Returns
true
false

Implements dotnamecpp::utils::IPathResolver.

◆ join()

std::filesystem::path dotnamecpp::utils::PathResolver::join ( const std::vector< std::string > & parts) const
nodiscardoverridevirtual

Join multiple path components.

Parameters
parts
Returns
std::filesystem::path

Implements dotnamecpp::utils::IPathResolver.

◆ operator=() [1/2]

PathResolver & dotnamecpp::utils::PathResolver::operator= ( const PathResolver & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

PathResolver & dotnamecpp::utils::PathResolver::operator= ( PathResolver && )
delete
Here is the call graph for this function:

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