XLE
v0.02.0
|
Split a path into its component directories More...
#include <PathUtils.h>
Public Types | |
enum | SectionType { CurrentDir, BackOne, Name } |
using | Section = StringSection< CharType > |
using | String = std::basic_string< CharType > |
Public Member Functions | |
unsigned | GetSectionCount () const |
SectionType | GetSectionType (unsigned index) const |
Section | GetSection (unsigned index) const |
Section | GetDrive () const |
SplitPath | Simplify () const |
bool | BeginsWithSeparator () const |
bool | EndsWithSeparator () const |
bool & | BeginsWithSeparator () |
bool & | EndsWithSeparator () |
String | Rebuild (const FilenameRules &rules=s_defaultFilenameRules) const |
void | Rebuild (CharType dest[], size_t destCount, const FilenameRules &rules=s_defaultFilenameRules) const |
IteratorRange< const Section * > | GetSections () const |
template<int Count> | |
void | Rebuild (CharType(&dest)[Count], const FilenameRules &rules=s_defaultFilenameRules) const |
SplitPath (const String &path) | |
SplitPath (const CharType path[]) | |
SplitPath (Section path) | |
SplitPath (SplitPath &&moveFrom) never_throws | |
SplitPath & | operator= (SplitPath &&moveFrom) never_throws |
Split a path into its component directories
This is a starting point when simplifying a path, converting separators, or converting between absolute and relative filename forms.
Note that this class does not keep a copy of the value passed in. If the input string is freed (or changes or becomes invalid), that the SplitPath will be invalidated. Be careful when using with volatile or temporary objects!