Represents a directory or file in a file system.
Inherits a local string buffer fixed to size 256. The flexible nature of ALib local strings allows dynamic allocation if this should be exceeded (which usually is not expected with paths).
The character type of this AString derivate is bound to type definition system::PathCharType, which in turn aliases std::filesystem::path::value_type
.
Definition at line 193 of file path.hpp.
|
| Path () |
|
| Path (const PathString &path) |
|
| Path (SystemFolders special) |
|
| Path (SystemFolders special, const PathString &fileName) |
|
Path & | Add (const PathString &dirOrFilename) |
|
ALIB_API void | AddModuleName (const PathString &extension) |
|
ALIB_API bool | Change (const PathString &path) |
|
ALIB_API bool | Change (SystemFolders special) |
|
void | Change (SystemFolders special, const PathString &fileName) |
|
ALIB_API SystemErrors | Create () |
|
ALIB_API SystemErrors | Create (const PathString &path) |
|
int | IsAbsolute () const |
|
ALIB_API bool | IsDirectory () |
|
ALIB_API SystemErrors | MakeReal () |
|
PathString | Name () const |
|
constexpr | TLocalString () |
|
| TLocalString (const TAppendable &src) |
|
| TLocalString (const TLocalString ©) |
|
constexpr | TLocalString (lang::HeapAllocator &pAllocator) |
|
| TLocalString (TLocalString &&move) noexcept |
|
TLocalString & | operator= (const TLocalString ©) |
|
TLocalString & | operator= (TLocalString &&move) |
|
constexpr | TAString () |
| Constructs an empty, nulled AString (does not allocate a buffer).
|
|
| TAString (const TAppendable &src) |
|
| TAString (const TAString ©) |
|
constexpr | TAString (lang::HeapAllocator &pAllocator) |
|
| TAString (TAString &&move) noexcept |
|
| ~TAString () noexcept |
| Destructs an AString object. An internally allocated buffer will be deleted.
|
|
| operator TCharArray () const |
|
| operator TCharArray () const |
|
TAString & | operator= (const TAString ©) |
|
void | dbgCheck () const |
|
void | DbgDisableBufferReplacementWarning () |
|
ALIB_API void | SetBuffer (integer newCapacity) |
|
ALIB_API void | SetBuffer (PathCharType *extBuffer, integer extBufferSize, integer extLength=0, lang::Responsibility responsibility=lang::Responsibility::KeepWithSender) |
|
void | EnsureRemainingCapacity (integer spaceNeeded) |
|
ALIB_API void | GrowBufferAtLeastBy (integer minimumGrowth) |
|
integer | Capacity () const |
|
bool | HasInternalBuffer () const |
|
void | SetNull () |
| Invokes SetBuffer(0).
|
|
constexpr const PathCharType * | Terminate () const |
|
PathCharType * | VBuffer () const |
|
void | SetCharAt (integer idx, PathCharType c) |
|
PathCharType & | operator[] (integer idx) |
|
void | SetLength (integer newLength) |
|
void | DetectLength () |
|
TAString & | ShortenTo (integer newLength) |
|
TAString & | Append (const TCharSrc *src, integer srcLength) |
|
TAString & | Append (const PathCharType *src, integer srcLength) |
|
TAString & | Append (const TString< PathCharType > &src, integer regionStart, integer regionLength=MAX_LEN) |
|
TAString & | Append (const TAppendable &src) |
|
TAString & | _ (const TString< PathCharType > &src, integer regionStart, integer regionLength=MAX_LEN) |
|
TAString & | _ (const TAppendable &src) |
|
TAString & | NewLine () |
|
TAString & | operator<< (const TAppendable &src) |
|
TAString & | _ () |
|
TAString & | Reset () |
|
TAString & | Reset (const TAppendable &src) |
|
TAString & | InsertAt (const TString< PathCharType > &src, integer pos) |
|
TAString & | InsertChars (PathCharType c, integer qty) |
|
TAString & | InsertChars (PathCharType c, integer qty, integer pos) |
|
TAString & | Delete (integer regionStart, integer regionLength=MAX_LEN) |
|
TAString & | DeleteStart (integer regionLength) |
|
TAString & | DeleteStart (const TString< PathCharType > &deleteIfMatch) |
|
TAString & | DeleteEnd (integer regionLength) |
|
TAString & | DeleteEnd (const TString< PathCharType > &deleteIfMatch) |
|
ALIB_API TAString & | Trim (const TCString< PathCharType > &trimChars=TT_CStringConstants< PathCharType >::DefaultWhitespaces()) |
|
ALIB_API integer | TrimAt (integer idx, const TCString< PathCharType > &trimChars=TT_CStringConstants< PathCharType >::DefaultWhitespaces()) |
|
TAString & | TrimStart (const TCString< PathCharType > &trimChars=TT_CStringConstants< PathCharType >::DefaultWhitespaces()) |
|
TAString & | TrimEnd (const TCString< PathCharType > &trimChars=TT_CStringConstants< PathCharType >::DefaultWhitespaces()) |
|
Iterator | begin () |
|
Iterator | end () |
|
ALIB_WARNINGS_RESTORE ReverseIterator | rbegin () |
|
ReverseIterator | rend () |
|
TAString & | ReplaceSubstring (const TString< PathCharType > &src, integer regionStart, integer regionLength) |
|
TAString & | ReplaceRegion (PathCharType c, integer regionStart, integer regionLength) |
|
ALIB_API integer | SearchAndReplace (PathCharType needle, PathCharType replacement, integer startIdx=0, integer endIdx=strings::MAX_LEN) |
|
ALIB_API integer | SearchAndReplace (const TString< PathCharType > &needle, const TString< PathCharType > &replacement, integer startIdx=0, integer maxReplacements=strings::MAX_LEN, lang::Case sensitivity=lang::Case::Sensitive, integer endIdx=strings::MAX_LEN) |
|
TAString & | ToUpper (integer regionStart=0, integer regionLength=MAX_LEN) |
|
TAString & | ToLower (integer regionStart=0, integer regionLength=MAX_LEN) |
|
TAString & | Reverse (integer regionStart=0, integer regionLength=MAX_LEN) |
|
ConstIterator | begin () const |
|
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE ConstIterator | end () const |
|
ALIB_WARNINGS_RESTORE ConstReverseIterator | rbegin () const |
|
ConstReverseIterator | rend () const |
|
constexpr | TString () noexcept=default |
| Defaulted default constructor.
|
|
constexpr | TString (const PathCharType *pBuffer, integer pLength) noexcept |
|
constexpr | TString (const TCharArray &src) |
|
constexpr | TString (const TString &) noexcept=default |
| Defaulted copy constructor.
|
|
| TString (ConstIterator &start, ConstIterator &end) |
|
| TString (TAllocator &allocator, const TString< PathCharType > ©) |
|
constexpr | TString (TString &&) noexcept=default |
| Defaulted move constructor.
|
|
| operator TCharArray () const |
|
| operator TCharArray () const |
|
TString & | operator= (const TString &) noexcept=default |
|
TString & | operator= (TString &&) noexcept=default |
|
constexpr const PathCharType * | Buffer () const |
|
constexpr integer | Length () const |
|
integer | WStringLength () const |
|
constexpr bool | IsNull () const |
|
constexpr bool | IsNotNull () const |
|
constexpr bool | IsEmpty () const |
|
constexpr bool | IsNotEmpty () const |
|
TString< PathCharType > | Substring (integer regionStart, integer regionLength=MAX_LEN) const |
|
PathCharType | CharAt (integer idx) const |
|
PathCharType | CharAtStart () const |
|
PathCharType | CharAtEnd () const |
|
PathCharType | operator[] (integer idx) const |
|
std::size_t | Hashcode () const |
|
std::size_t | HashcodeIgnoreCase () const |
|
bool | Equals (const TString< PathCharType > &rhs) const |
|
int | CompareTo (const TString< PathCharType > &rhs) const |
|
int | CompareTo (const TString &rhs, integer rhsRegionStart, integer rhsRegionLength=MAX_LEN) const |
|
int | CompareTo (const TString &rhs, integer rhsRegionStart, integer rhsRegionLength, integer regionStart, integer regionLength=MAX_LEN) const |
|
bool | ContainsAt (const TString &needle, integer pos) const |
|
bool | StartsWith (const TString &needle) const |
|
bool | EndsWith (const TString &needle) const |
|
integer | IndexOf (PathCharType needle, integer startIdx=0) const |
|
integer | IndexOf (PathCharType needle, integer regionStart, integer regionLength) const |
|
integer | IndexOf (const TString &needle, integer startIdx=0, integer endIdx=strings::MAX_LEN) const |
|
integer | IndexOfOrLength (PathCharType needle) const |
|
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE integer | IndexOfOrLength (PathCharType needle, integer startIdx) const |
|
ALIB_WARNINGS_RESTORE integer | LastIndexOf (PathCharType needle, integer startIndex=MAX_LEN) const |
|
integer | IndexOfAny (const TString &needles, integer startIdx=0) const |
|
integer | LastIndexOfAny (const TString &needles, integer startIdx=MAX_LEN) const |
|
integer | IndexOfFirstDifference (const TString &needle, lang::Case sensitivity=lang::Case::Sensitive, integer startIdx=0) const |
|
integer | IndexOfSegmentEnd (PathCharType opener, PathCharType closer, integer idx) const |
|
integer | CountChar (PathCharType needle, integer startPos=0) const |
|
integer | CountChar (PathCharType needle, PathCharType omit, integer startPos) const |
|
integer | Count (const TString &needle, integer startPos=0) const |
|
integer | Count (const TString &needle, const TString &omit, integer startPos=0) const |
|
ALIB_API uint64_t | ParseDecDigits (integer startIdx=0, integer *newIdx=nullptr) const |
|
ALIB_API int64_t | ParseInt (integer startIdx=0, TNumberFormat< PathCharType > *numberFormat=nullptr, integer *newIdx=nullptr) const |
|
int64_t | ParseInt (TNumberFormat< PathCharType > *numberFormat, integer *newIdx=nullptr) const |
|
int64_t | ParseInt (integer *newIdx) const |
|
int64_t | ParseInt (integer startIdx, integer *newIdx) const |
|
ALIB_API uint64_t | ParseDec (integer startIdx=0, TNumberFormat< PathCharType > *numberFormat=nullptr, integer *newIdx=nullptr) const |
|
uint64_t | ParseDec (TNumberFormat< PathCharType > *numberFormat, integer *newIdx=nullptr) const |
|
uint64_t | ParseDec (integer *newIdx) const |
|
uint64_t | ParseDec (integer startIdx, integer *newIdx) const |
|
ALIB_API uint64_t | ParseBin (integer startIdx=0, TNumberFormat< PathCharType > *numberFormat=nullptr, integer *newIdx=nullptr) const |
|
uint64_t | ParseBin (TNumberFormat< PathCharType > *numberFormat, integer *newIdx=nullptr) const |
|
uint64_t | ParseBin (integer *newIdx) const |
|
uint64_t | ParseBin (integer startIdx, integer *newIdx) const |
|
ALIB_API uint64_t | ParseHex (integer startIdx=0, TNumberFormat< PathCharType > *numberFormat=nullptr, integer *newIdx=nullptr) const |
|
uint64_t | ParseHex (TNumberFormat< PathCharType > *numberFormat, integer *newIdx=nullptr) const |
|
uint64_t | ParseHex (integer *newIdx) const |
|
uint64_t | ParseHex (integer startIdx, integer *newIdx) const |
|
ALIB_API uint64_t | ParseOct (integer startIdx=0, TNumberFormat< PathCharType > *numberFormat=nullptr, integer *newIdx=nullptr) const |
|
uint64_t | ParseOct (TNumberFormat< PathCharType > *numberFormat, integer *newIdx=nullptr) const |
|
uint64_t | ParseOct (integer *newIdx) const |
|
uint64_t | ParseOct (integer startIdx, integer *newIdx) const |
|
ALIB_API double | ParseFloat (integer startIdx=0, TNumberFormat< PathCharType > *numberFormat=nullptr, integer *newIdx=nullptr) const |
|
double | ParseFloat (TNumberFormat< PathCharType > *numberFormat, integer *newIdx=nullptr) const |
|
double | ParseFloat (integer *newIdx) const |
|
double | ParseFloat (integer startIdx, integer *newIdx) const |
|
integer | CopyTo (PathCharType *dest) const |
|
void | Allocate (TAllocator &allocator, const TString< PathCharType > ©) |
|
void | Free (TAllocator &allocator) |
|
ConstIterator | begin () const |
|
ConstIterator | cbegin () const |
|
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE ConstIterator | end () const |
|
ConstIterator | cend () const |
|
ALIB_WARNINGS_RESTORE ConstReverseIterator | rbegin () const |
|
ConstReverseIterator | rend () const |
|
ConstReverseIterator | crbegin () const |
|
ConstReverseIterator | crend () const |
|
bool | AdjustRegion (integer ®ionStart, integer ®ionLength) const |
|
| AllocatorMember ()=delete |
| Deleted default constructor. (The allocator has to be given with construction)
|
|
| AllocatorMember (lang::HeapAllocator &pAllocator) noexcept |
|
AllocatorInterface< lang::HeapAllocator > | AI () const noexcept |
|
lang::HeapAllocator & | GetAllocator () const noexcept |
|