MiKTeX 23.10-next
A scalable TeX distribution
|
Instances of this class can be used to store path names. More...
#include <miktex/Util/PathName.h>
Public Member Functions | |
PathName (const PathName &other)=default | |
PathName & | operator= (const PathName &other)=default |
PathName (PathName &&other) noexcept=default | |
PathName & | operator= (PathName &&other) noexcept=default |
PathName (const char *path) | |
PathName (const wchar_t *path) | |
PathName (const std::string &path) | |
PathName (const std::wstring &path) | |
PathName (size_t n)=delete | |
PathName (const char *component1, const char *component2) | |
PathName (const PathName &component1, const PathName &component2) | |
PathName & | operator= (const char *path) |
PathName & | operator= (const wchar_t *path) |
PathName & | operator= (const std::string &path) |
PathName & | operator= (const std::wstring &path) |
MIKTEXUTILTHISAPI (std::size_t) GetHash() const | |
PathName | GetDirectoryName () const |
PathName | GetFileName () const |
PathName | GetFileNameWithoutExtension () const |
PathName & | RemoveFileSpec () |
PathName & | RemoveDirectorySpec () |
MIKTEXUTILTHISAPI (PathName &) SetToHomeDirectory() | |
MIKTEXUTILTHISAPI (PathName &) SetToLockDirectory() | |
MIKTEXUTILTHISAPI (PathName &) SetToCurrentDirectory() | |
MIKTEXUTILTHISAPI (PathName &) SetToTempDirectory() | |
MIKTEXUTILTHISAPI (PathName &) SetToTempFile() | |
MIKTEXUTILTHISAPI (PathName &) SetToTempFile(const PathName &directory) | |
MIKTEXUTILTHISAPI (PathName) GetMountPoint() const | |
MIKTEXUTILTHISAPI (PathName &) Convert(ConvertPathNameOptions options) | |
PathName & | ConvertToUnix () |
PathName | ToUnix () const |
PathName & | ConvertToDos () |
PathName | ToDos () const |
PathName | ToExtendedLengthPathName () const |
std::wstring | ToWideCharString () const |
std::wstring | ToNativeString () const |
MIKTEXUTILTHISAPI (std::string) ToDisplayString(DisplayPathNameOptions options | |
PathName & | TransformForComparison () |
bool | IsFullyQualified () const |
bool | IsAbsolute () const |
bool | IsComparable () const |
PathName & | Canonicalize () |
PathName & | MakeFullyQualified () |
bool | HasExtension () const |
bool | HasExtension (const char *extension) const |
MIKTEXUTILTHISAPI (std::string) GetExtension() const | |
MIKTEXUTILTHISAPI (PathName &) SetExtension(const char *extension | |
PathName & | SetExtension (const char *extension) |
PathName & | SetExtension (const std::string &extension) |
PathName & | AppendExtension (const char *extension) |
PathName & | AppendExtension (const std::string &extension) |
bool | EndsWithDirectoryDelimiter () const |
PathName & | Append (const char *lpsz, bool appendDirectoryDelimiter) |
PathName & | Append (const std::string &str, bool appendDirectoryDelimiter) |
PathName & | AppendComponent (const char *component) |
PathName & | operator/= (const char *component) |
PathName & | operator/= (const PathName &component) |
PathName & | operator/= (const std::string &component) |
MIKTEXUTILTHISAPI (PathName &) CutOffLastComponent(bool allowSelfCutting) | |
PathName & | CutOffLastComponent () |
MIKTEXUTILTHISAPI (PathName &) AppendDirectoryDelimiter() | |
MIKTEXUTILTHISAPI (PathName &) AppendAltDirectoryDelimiter() | |
bool | IsExplicitlyRelative () const |
Public Member Functions inherited from MiKTeX::Util::CharBuffer< char, MIKTEX_UTIL_PATHNAME_SIZE > | |
CharBuffer (const CharBuffer &other) | |
CharBuffer (CharBuffer &&other) noexcept | |
CharBuffer (const char *lpsz) | |
CharBuffer (const char16_t *lpsz) | |
CharBuffer (const wchar_t *lpsz) | |
CharBuffer (const std::basic_string< char > &other) | |
CharBuffer (const std::basic_string< char16_t > &other) | |
CharBuffer (const std::basic_string< wchar_t > &other) | |
CharBuffer (std::size_t n) | |
CharBuffer & | operator= (const CharBuffer &other) |
CharBuffer & | operator= (CharBuffer &&other) noexcept |
CharBuffer & | operator= (const OtherCharType *lpsz) |
CharBuffer & | operator= (const std::basic_string< OtherCharType > &s) |
void | Set (const CharBuffer &other) |
void | Set (const OtherCharType *lpsz) |
void | Set (const std::basic_string< OtherCharType > &s) |
void | Append (const std::basic_string< char > &s) |
void | Append (const char *lpsz) |
void | Append (const char *s, std::size_t len) |
void | Append (char ch) |
void | Clear () |
bool | Empty () const |
void | Reset () |
void | Reserve (std::size_t newSize) |
std::basic_string< char > | ToString () const |
const char * | GetData () const |
char * | GetData () |
std::size_t | GetLength () const |
std::size_t | GetCapacity () const |
const char & | operator[] (std::size_t idx) const |
char & | operator[] (std::size_t idx) |
CharBuffer & | operator+= (const char *lpsz) |
CharBuffer & | operator+= (const std::basic_string< char > &s) |
CharBuffer & | operator+= (char ch) |
Static Public Member Functions | |
static std::vector< std::string > | Split (const PathName &path) |
static int | Compare (const char *lpszPath1, const char *lpszPath2, std::size_t count) |
static int | Compare (const PathName &path1, const PathName &path2, std::size_t count) |
static int | Compare (const char *lpszPath1, const char *lpszPath2) |
static int | Compare (const PathName &path1, const PathName &path2) |
static int | Compare (const std::string &path1, const std::string &path2) |
static bool | Equals (const PathName &path1, const PathName &path2) |
static bool | Match (const char *lpszPattern, const char *lpszPath) |
static bool | Match (const char *lpszPattern, const PathName &path) |
Public Attributes | |
bool | override |
Protected Types | |
typedef CharBuffer< char, MIKTEX_UTIL_PATHNAME_SIZE > | Base |
Instances of this class can be used to store path names.
|
inlineexplicit |
Copies a character string into a new PathName object.
rhs | Null-terminated character string. |
|
inlineexplicit |
Copies a wide character string into a new PathName object.
rhs | Null-terminated character string. |
|
inlineexplicit |
Copies a string object into a new PathName object.
rhs | String object. |
|
inlineexplicit |
Copies a string object into a new PathName object.
rhs | String object. |
|
inline |
Combines path name components into a new PathName object.
component1 | The first component (fully qualified directory path). |
component2 | The second component (relative file name path). |
|
inline |
Combines path name components into a new PathName object.
component1 | The first component (fully qualified directory path). |
component2 | The second component (relative file name path). |
|
inline |
Appends a character string to this path name.
lpsz | The null-terminated character string to add. |
appendDirectoryDelimiter | Indicates whether a directory delimiter shall be appended before the string. |
|
inline |
Appends a path name component to this path name.
lpszComponent | The null-terminated component to add. |
|
static |
Compares two path names.
lpszPath1 | The first path name. |
lpszPath1 | The second path name. |
|
static |
Compares the prefixes of two path names.
lpszPath1 | The first path name. |
lpszPath1 | The second path name. |
count | Number of characters to compare. |
|
inlinestatic |
Compares two path names.
path1 | The first path name. |
path1 | The second path name. |
|
inlinestatic |
Compares two path names.
path1 | The first path name. |
path1 | The second path name. |
|
inline |
Replaces normal slashes with backslashes.
|
inline |
Replaces backslashes with normal slashes.
|
inline |
Cuts off the last component from the path name.
|
inline |
Checks to see whether this path name ends with a directory delimiter.
|
inline |
Checks to see whether this path name has the specified extension.
lpszExtension | File name extension. |
|
inline |
Converts this path name into a fully qualified path name.
|
static |
Matches a path name against a wildcard pattern.
lpszPattern | The wildcard pattern. |
lpszPath | The path name to test. |
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | PathName & | ) |
Makes sure that this path name ends with a directory delimiter.
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | PathName & | ) |
Cuts off the last component from the path name.
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | PathName & | ) | const |
Sets the file name extension.
extension | The file name extension to set. |
override | Indicates whether an existing file name extension shall be overridden. |
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | PathName & | ) |
Sets this PathName object equal to the current (working) directory.
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | PathName & | ) |
Sets this PathName object equal to the temporary directory.
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | PathName & | ) |
Sets this PathName object equal to the name of a temporary file.
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | PathName & | ) | const & |
Sets this PathName object equal to the name of a temporary file in the specified directory.
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | PathName | ) | const |
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | std::size_t | ) | const |
Calculates the hash value of this PathName object.
MiKTeX::Util::PathName::MIKTEXUTILTHISAPI | ( | std::string | ) | const |
Gets the file name extension.
|
inline |
Appends a path name component to this path name.
lpszComponent | The null-terminated component to add. |
Appends a path name component to this path name.
component | The component to be appended. |
|
inline |
Appends a path name component to this path name.
component | The component to be appended. |
|
inline |
Removes the directory component from this path name.
|
inline |
Removes the file name component from this path name.
|
inline |
Sets the file name extension.
lpszExtension | The file name extension to set. Can be 0, if the extension is to be removed. |
|
inline |
Sets the file name extension.
lpszExtension | The file name extension to set. Can be 0, if the extension is to be removed. |
|
inline |
Transform this path for comparison purposes.