CZipPathComponent Class Reference

A class splitting a file path into components. More...

#include <ZipPathComponent.h>

List of all members.

Public Member Functions

 CZipPathComponent ()
 CZipPathComponent (LPCTSTR lpszFullPath)
 Construct the object and set a path.
void SetFullPath (LPCTSTR lpszFullPath)
 Set the path.
CZipString GetFileTitle () const
void SetFileTitle (LPCTSTR lpszFileTitle)
 Set the file title (without an extension).
void SetExtension (LPCTSTR lpszExt)
 Set the extension alone.
CZipString GetFileExt () const
CZipString GetFileDrive () const
CZipString GetNoDrive () const
CZipString GetFileName () const
CZipString GetFullPath () const
CZipString GetFilePath () const

Static Public Member Functions

static void AppendSeparator (CZipString &szPath)
 Append a path separator to szPath if it is not already there.
static void RemoveSeparators (CZipString &szPath)
 Remove separators from the end of szPath.
static void RemoveSeparatorsLeft (CZipString &szPath)
 Remove separators from the beginning of szPath.
static bool IsSeparator (TCHAR c)
static bool HasEndingSeparator (const CZipString &szPath)

Static Public Attributes

static const TCHAR m_cSeparator
 A system - specific default path separator. Defined in ZipPlatform.cpp.

Protected Attributes

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


Detailed Description

A class splitting a file path into components.

Definition at line 34 of file ZipPathComponent.h.


Constructor & Destructor Documentation

CZipPathComponent::CZipPathComponent LPCTSTR  lpszFullPath  )  [inline]
 

Construct the object and set a path.

Parameters:
lpszFullPath the full path of the file
See also:
SetFullPath

Definition at line 99 of file ZipPathComponent.h.


Member Function Documentation

CZipString CZipPathComponent::GetFileDrive  )  const [inline]
 

Returns:
the drive (no path separator at the end)

Definition at line 145 of file ZipPathComponent.h.

CZipString CZipPathComponent::GetFileExt  )  const [inline]
 

Returns:
the file extension without a dot

Definition at line 141 of file ZipPathComponent.h.

CZipString CZipPathComponent::GetFileName  )  const [inline]
 

Returns:
the filename including an extension

Definition at line 154 of file ZipPathComponent.h.

CZipString CZipPathComponent::GetFilePath  )  const [inline]
 

Returns:
the path of the file (without the separator at the end)

Definition at line 182 of file ZipPathComponent.h.

CZipString CZipPathComponent::GetFileTitle  )  const [inline]
 

Returns:
the filename (without an extension)

Definition at line 116 of file ZipPathComponent.h.

CZipString CZipPathComponent::GetFullPath  )  const [inline]
 

Returns:
the full path of the file (including the filename)

Definition at line 167 of file ZipPathComponent.h.

CZipString CZipPathComponent::GetNoDrive  )  const
 

Returns:
the full path without the drive (no separator at the beginning)

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

Returns:
true if the path has a path separator at the and

Definition at line 84 of file ZipPathComponent.h.

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

Returns:
true if c is a slash or a backslash

Definition at line 76 of file ZipPathComponent.h.

void CZipPathComponent::SetExtension LPCTSTR  lpszExt  )  [inline]
 

Set the extension alone.

Parameters:
lpszExt may but not have to contain a dot at the beginning

Definition at line 132 of file ZipPathComponent.h.

void CZipPathComponent::SetFileTitle LPCTSTR  lpszFileTitle  )  [inline]
 

Set the file title (without an extension).

Parameters:
lpszFileTitle 
Returns:

Definition at line 124 of file ZipPathComponent.h.

void CZipPathComponent::SetFullPath LPCTSTR  lpszFullPath  ) 
 

Set the path.

Parameters:
lpszFullPath a full path to the file (including a filename - the last element in the path is assumed to be a filename)


The documentation for this class was generated from the following file:
ZipArchive Copyright © 2000 - 2006 Tadeusz Dracz . Generated at Fri Apr 7 13:55:25 2006.