#include <ZipPathComponent.h>
Public Types | |
enum | PrefixType { ptNone = 0, ptUnc = 2, ptUnicode = 4, ptUncWin = 8 } |
Public Member Functions | |
CZipPathComponent (LPCTSTR lpszFullPath) | |
CZipString | GetFileDrive () const |
CZipString | GetFileExt () const |
CZipString | GetFileName () const |
CZipString | GetFilePath () const |
CZipString | GetFileTitle () const |
CZipString | GetFullPath () const |
CZipString | GetNoDrive () const |
void | SetExtension (LPCTSTR lpszExt) |
void | SetFileTitle (LPCTSTR lpszFileTitle) |
void | SetFullPath (LPCTSTR lpszFullPath) |
Static Public Member Functions | |
static void | AppendSeparator (CZipString &szPath) |
static void | Combine (CZipString &szPath, LPCTSTR lpszName) |
static bool | HasEndingSeparator (const CZipString &szPath) |
static int | IsPrefixed (const CZipString &path) |
static bool | IsSeparator (TCHAR c) |
static void | RemoveSeparators (CZipString &szPath) |
static void | RemoveSeparatorsLeft (CZipString &szPath) |
Static Public Attributes | |
static const TCHAR | m_cSeparator |
A system specific default path separator. | |
static const CZipString | PathPrefix |
Protected Attributes | |
Path parts. | |
CZipString | m_szDirectory |
The path without the filename and without path separators at the end and the beginning. | |
CZipString | m_szDrive |
The drive (if the system path standard uses it). It does not include a path separator at the end. | |
CZipString | m_szFileExt |
The file extension without the dot character. | |
CZipString | m_szFileTitle |
The filename without the extension. | |
CZipString | m_szPrefix |
The prefix (e.g. for the UNC path or Unicode path under Windows). |
Definition at line 37 of file ZipPathComponent.h.
The type of the prefix in path.
ptNone | There is no prefix present. |
ptUnc | UNC path. |
ptUnicode | Unicode path. |
ptUncWin | Windows UNC path. |
Definition at line 46 of file ZipPathComponent.h.
CZipPathComponent::CZipPathComponent | ( | LPCTSTR | lpszFullPath | ) | [inline] |
Initializes a new instance of the CZipPathComponent class.
lpszFullPath | The full path to the file. |
Definition at line 74 of file ZipPathComponent.h.
static void CZipPathComponent::AppendSeparator | ( | CZipString & | szPath | ) | [inline, static] |
Appends a path separator to szPath, if it is not already appended.
szPath | The path to have a separator appended. |
Definition at line 89 of file ZipPathComponent.h.
static void CZipPathComponent::Combine | ( | CZipString & | szPath, | |
LPCTSTR | lpszName | |||
) | [inline, static] |
Combines a path information with a file name information.
szPath | Provides the path information and retrieves the result. | |
lpszName | The filename to be appended to the path. |
Definition at line 104 of file ZipPathComponent.h.
CZipString CZipPathComponent::GetFileDrive | ( | ) | const [inline] |
Returns the drive of the file.
Definition at line 219 of file ZipPathComponent.h.
CZipString CZipPathComponent::GetFileExt | ( | ) | const [inline] |
Returns the extension of the file.
Definition at line 211 of file ZipPathComponent.h.
CZipString CZipPathComponent::GetFileName | ( | ) | const [inline] |
Returns the filename.
Definition at line 235 of file ZipPathComponent.h.
CZipString CZipPathComponent::GetFilePath | ( | ) | const [inline] |
Returns the path part only.
Definition at line 272 of file ZipPathComponent.h.
CZipString CZipPathComponent::GetFileTitle | ( | ) | const [inline] |
Returns the name of the file without the extension (and without the path).
Definition at line 182 of file ZipPathComponent.h.
CZipString CZipPathComponent::GetFullPath | ( | ) | const [inline] |
Returns the full path to the file.
Definition at line 252 of file ZipPathComponent.h.
CZipString CZipPathComponent::GetNoDrive | ( | ) | const |
Returns the full path to the file without the drive.
static bool CZipPathComponent::HasEndingSeparator | ( | const CZipString & | szPath | ) | [inline, static] |
Checks if szPath has a path separator appended.
szPath | The path to be tested. |
true
, if szPath has a path separator at the end; false
otherwise. Definition at line 158 of file ZipPathComponent.h.
static int CZipPathComponent::IsPrefixed | ( | const CZipString & | path | ) | [static] |
Returns the length of the path prefix detected.
path | The path to examine. |
0
, if no prefix was detected. static bool CZipPathComponent::IsSeparator | ( | TCHAR | c | ) | [inline, static] |
Returns the value indicating whether the given character is a path separator.
c | The character to test. |
true
, if c is a path separator; false
otherwise. Definition at line 144 of file ZipPathComponent.h.
static void CZipPathComponent::RemoveSeparators | ( | CZipString & | szPath | ) | [inline, static] |
Removes path separators from the end of szPath
szPath | The path to have path separators removed. |
Definition at line 117 of file ZipPathComponent.h.
static void CZipPathComponent::RemoveSeparatorsLeft | ( | CZipString & | szPath | ) | [inline, static] |
Removes path separators from the beginning of szPath.
szPath | The path to have path separators removed. |
Definition at line 129 of file ZipPathComponent.h.
void CZipPathComponent::SetExtension | ( | LPCTSTR | lpszExt | ) | [inline] |
Sets the extension.
lpszExt | The extension to set. May contain the dot character at the beginning, but doesn't have to. |
Definition at line 199 of file ZipPathComponent.h.
void CZipPathComponent::SetFileTitle | ( | LPCTSTR | lpszFileTitle | ) | [inline] |
Sets the file title (the name without the extension and without the path).
lpszFileTitle | The title to set. |
Definition at line 190 of file ZipPathComponent.h.
void CZipPathComponent::SetFullPath | ( | LPCTSTR | lpszFullPath | ) |
Sets the full path to the file.
lpszFullPath | The full path to the file including a filename. The last element in the path is assumed to be the filename. |
const TCHAR CZipPathComponent::m_cSeparator [static] |
CZipString CZipPathComponent::m_szDirectory [protected] |
The path without the filename and without path separators at the end and the beginning.
Definition at line 286 of file ZipPathComponent.h.
CZipString CZipPathComponent::m_szDrive [protected] |
The drive (if the system path standard uses it). It does not include a path separator at the end.
Definition at line 286 of file ZipPathComponent.h.
CZipString CZipPathComponent::m_szFileExt [protected] |
CZipString CZipPathComponent::m_szFileTitle [protected] |
CZipString CZipPathComponent::m_szPrefix [protected] |
The prefix (e.g. for the UNC path or Unicode path under Windows).
Definition at line 286 of file ZipPathComponent.h.