OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
FileSystemPathComponents Class Reference

#include <FileSystemPathComponents.h>

Public Member Functions

FileSystemPathView prefix () const
 
std::string_view name () const
 
std::string_view stem () const
 
std::string_view extension () const
 

Private Member Functions

 FileSystemPathComponents (std::string_view path)
 

Private Attributes

std::string_view _path
 
size_t _prefixEnd
 
size_t _nameStart
 
size_t _extStart
 

Friends

class FileSystemPathView
 

Constructor & Destructor Documentation

◆ FileSystemPathComponents()

FileSystemPathComponents::FileSystemPathComponents ( std::string_view  path)
inlineexplicitprivate

Member Function Documentation

◆ extension()

std::string_view FileSystemPathComponents::extension ( ) const
inline
Returns
Extension of the last path component.

◆ name()

std::string_view FileSystemPathComponents::name ( ) const
inline
Returns
Last path component. Returns an empty string for empty path.

◆ prefix()

FileSystemPathView FileSystemPathComponents::prefix ( ) const
inline
Returns
Path without the last path component. Note that this is different from the intuitive understanding of a "parent" path because prefix for "../.." is "..", but the latter is not a parent of the former.

◆ stem()

std::string_view FileSystemPathComponents::stem ( ) const
inline
Returns
Name of the last path component w/o the extension.

Friends And Related Function Documentation

◆ FileSystemPathView

friend class FileSystemPathView
friend

Member Data Documentation

◆ _extStart

size_t FileSystemPathComponents::_extStart
private

◆ _nameStart

size_t FileSystemPathComponents::_nameStart
private

◆ _path

std::string_view FileSystemPathComponents::_path
private

◆ _prefixEnd

size_t FileSystemPathComponents::_prefixEnd
private

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