Skip Navigation Links
Skip Navigation LinksHome > ZipArchive > How to Use > API Documentation

CZipPathComponent Class Reference

#include <ZipPathComponent.h>

List of all members.


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 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.

Protected Attributes

Path parts.
CZipString m_szDirectory
 A directory(ies) only without path separators at the end and the beginning.
CZipString m_szDrive
 A drive (if the system path standard uses it) without a path separator at the end.
CZipString m_szFileExt
 A file extension without a dot.
CZipString m_szFileTitle
 A filename without an extension.
CZipString m_szPrefix
 A prefix (e.g. for the UNC path or Unicode path under Windows).

Detailed Description

Splits a file path into components.

Constructor & Destructor Documentation

CZipPathComponent::CZipPathComponent ( LPCTSTR  lpszFullPath  )  [inline]

Initializes a new instance of the CZipPathComponent class.

Parameters:
lpszFullPath The full path to the file.
See also:
SetFullPath


Member Function Documentation

static void CZipPathComponent::AppendSeparator ( CZipString &  szPath  )  [inline, static]

Appends a path separator to szPath, if it is not already appended.

Parameters:
szPath The path to have a separator appended.

static void CZipPathComponent::Combine ( CZipString &  szPath,
LPCTSTR  lpszName 
) [inline, static]

Combines a path information with a file name information.

Parameters:
szPath Provides the path information and retrieves the result.
lpszName The filename to be appended to the path.

CZipString CZipPathComponent::GetFileDrive (  )  const [inline]

Gets the drive of the file.

Returns:
The drive without a path separator at the end.

CZipString CZipPathComponent::GetFileExt (  )  const [inline]

Gets the extension of the file.

Returns:
The extension without a dot.

CZipString CZipPathComponent::GetFileName (  )  const [inline]

Get the filename.

Returns:
The filename including an extension and without a path.

CZipString CZipPathComponent::GetFilePath (  )  const [inline]

Gets the path part only.

Returns:
The path to the file without a filename and without a path separator at the end.

CZipString CZipPathComponent::GetFileTitle (  )  const [inline]

Gets the name of the file without an extension (and without a path).

Returns:
The title of the file.

CZipString CZipPathComponent::GetFullPath (  )  const [inline]

Gets the full path to the file.

Returns:
The full path information including the filename.

CZipString CZipPathComponent::GetNoDrive (  )  const

Gets the full path to the file without the drive.

Returns:
The path without the drive and without a path separator at the beginning.

static bool CZipPathComponent::HasEndingSeparator ( const CZipString &  szPath  )  [inline, static]

Checks if szPath has a path separator appended.

Parameters:
szPath The path to be tested.
Returns:
true, if szPath has a path separator at the end; false otherwise.

static bool CZipPathComponent::IsSeparator ( TCHAR  c  )  [inline, static]

Tests the character, if it is a separator or not.

Parameters:
c The character to test.
Returns:
true, if c is a path separator; false otherwise.

static void CZipPathComponent::RemoveSeparators ( CZipString &  szPath  )  [inline, static]

Removes path separators from the end of szPath

Parameters:
szPath The path to have path separators removed.

static void CZipPathComponent::RemoveSeparatorsLeft ( CZipString &  szPath  )  [inline, static]

Removes path separators from the beginning of szPath.

Parameters:
szPath The path to have path separators removed.

void CZipPathComponent::SetExtension ( LPCTSTR  lpszExt  )  [inline]

Sets the extension alone.

Parameters:
lpszExt The extension to set. May contain a dot at the beginning, but doesn't have to.

void CZipPathComponent::SetFileTitle ( LPCTSTR  lpszFileTitle  )  [inline]

Sets the file title (the name without an extension and without a path).

Parameters:
lpszFileTitle The title to set.

void CZipPathComponent::SetFullPath ( LPCTSTR  lpszFullPath  ) 

Sets the full path to the file.

Parameters:
lpszFullPath The full path to the file including a filename. The last element in the path is assumed to be a filename.


Member Data Documentation

const TCHAR CZipPathComponent::m_cSeparator [static]

A system - specific default path separator.

CZipString CZipPathComponent::m_szDirectory [protected]

A directory(ies) only without path separators at the end and the beginning.

CZipString CZipPathComponent::m_szDrive [protected]

A drive (if the system path standard uses it) without a path separator at the end.

CZipString CZipPathComponent::m_szFileExt [protected]

A file extension without a dot.

CZipString CZipPathComponent::m_szFileTitle [protected]

A filename without an extension.

CZipString CZipPathComponent::m_szPrefix [protected]

A prefix (e.g. for the UNC path or Unicode path under Windows).


The documentation for this class was generated from the following file:
Back To Top Up