- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::Host::CDriveInformation Class Reference

List of all members.

## Detailed Description

Gives informaiton about the disk structure on the host system.

Date:
  26/09/2004

Author:
  Paul Chana

Version:
  1.0.0 Initial version

  1.1.0 Made GetDriveNames take an inplace TStringArray

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CDriveInformation.hpp,v 1.4 2007/02/08 21:06:44 paul Exp

Definition at line 40 of file CDriveInformation.hpp.

## Static Public Member Functions

- static bool driveIsCdrom (const CString &driveToExamine)
- static bool driveIsFixedDrive (const CString &driveToExamine)
- static bool driveIsNetworkDrive (const CString &driveToExamine)
- static void dumpDriveInfoToFile (CTextStream &stream)
- static void dumpDriveInfoToFile (const CSystemString &path)
- static void getDriveInformation (const CString &driveToExamine, CString &volumeName, CString &fileSystem, long &volumeSerialNumber)
- static void getDriveNames (TStringCountedPointerArray &array)
- static long getDriveType (const CString &driveToExamine)
- static void getDriveTypeAsString (const CString &driveToExamine, CString type)
- static void getWindowsFolder (CSystemString &folder)
- static void getWindowsTemporaryFolder (CSystemString &folder)

## Static Public Attributes

- static const long CDRIVE_INFO_CDROM_DRIVE = DRIVE_CDROM
- static const long CDRIVE_INFO_FIXED_DRIVE = DRIVE_FIXED
- static const long CDRIVE_INFO_NETWORK_DRIVE = DRIVE_REMOTE
- static const long CDRIVE_INFO_RAM_DRIVE = DRIVE_RAMDISK
- static const long CDRIVE_INFO_REMOVEABLE_DRIVE = DRIVE_REMOVABLE
- static const long CDRIVE_INFO_UNKNOWN_DRIVE = DRIVE_UNKNOWN
- static const long CDRIVE_INFO_UNMOUNTED_DRIVE = DRIVE_NO_ROOT_DIR

## Static Private Attributes

- static const char * CDRIVE_INFO_DRIVE_STRINGS []

## Member Function Documentation

static bool Exponent::Host::CDriveInformation::driveIsCdrom | ( | const CString & | driveToExamine | ) | `[static]`

Is the drive a cdrom

Parameters:

  | driveToExamine | The drive to examine

Return values:

  | bool | True if drive is CDROM, false otherwise

static bool Exponent::Host::CDriveInformation::driveIsFixedDrive | ( | const CString & | driveToExamine | ) | `[static]`

Is local hard disk

Parameters:

  | driveToExamine | The drive to examine

Return values:

  | bool | True if drive is local hard disk, false otherwise

static bool Exponent::Host::CDriveInformation::driveIsNetworkDrive | ( | const CString & | driveToExamine | ) | `[static]`

Is the drive a network drive

Parameters:

  | driveToExamine | The drive to examine

Return values:

  | bool | True if drive is network drive, false otherwise

static void Exponent::Host::CDriveInformation::dumpDriveInfoToFile | ( | CTextStream & | stream | ) | `[static]`

Dump the info to a stream output

Parameters:

  | stream | The stream to use

static void Exponent::Host::CDriveInformation::dumpDriveInfoToFile | ( | const CSystemString & | path | ) | `[static]`

Dump the info to a text file

Parameters:

  | path | The path to write the data to

static void Exponent::Host::CDriveInformation::getDriveInformation | ( | const CString & | driveToExamine,
|  | CString & | volumeName,
|  | CString & | fileSystem,
|  | long & | volumeSerialNumber |
| ) |  |  | `[static]`

Get drive information - drive to examine should be of form "c:\" or "network name\network drive name\"
NOTES : On mac the volumeSerialNumber is actually the volume number (starting at 0 i believe)

Parameters:

  | driveToExamine | The drive to examine
  | volumeName | On return is filled with the volume nmae
  | fileSystem | On return is filled with a string identifying the filesystem
  | volumeSerialNumber | On return is filled with the volume serial number

static void Exponent::Host::CDriveInformation::getDriveNames | ( | TStringCountedPointerArray & | array | ) | `[static]`

Get the name of all valid drives

Parameters:

  | array | The array to fill

static long Exponent::Host::CDriveInformation::getDriveType | ( | const CString & | driveToExamine | ) | `[static]`

Get the drive type

Parameters:

  | driveToExamine | The drive to examine

Return values:

  | long | The type of drive

static void Exponent::Host::CDriveInformation::getDriveTypeAsString | ( | const CString & | driveToExamine,
|  | CString | type |
| ) |  |  | `[static]`

Get the drive type as a string

Parameters:

  | driveToExamine | The drive to examine
  | type | On return stores the type of drive as a string

static void Exponent::Host::CDriveInformation::getWindowsFolder | ( | CSystemString & | folder | ) | `[static]`

Get the windows folder

Parameters:

  | folder | On return stores the path to the windows folder

static void Exponent::Host::CDriveInformation::getWindowsTemporaryFolder | ( | CSystemString & | folder | ) | `[static]`

Get the windows temp folder

Parameters:

  | folder | On return stores the path to the windows temp folder

## Member Data Documentation

const long Exponent::Host::CDriveInformation::CDRIVE_INFO_CDROM_DRIVE = DRIVE_CDROM`[static]`

Drive is a CDROM

Definition at line 54 of file CDriveInformation.hpp.

const char* Exponent::Host::CDriveInformation::CDRIVE_INFO_DRIVE_STRINGS[]`[static, private]`

Drive types as strings

Definition at line 158 of file CDriveInformation.hpp.

const long Exponent::Host::CDriveInformation::CDRIVE_INFO_FIXED_DRIVE = DRIVE_FIXED`[static]`

Drive is fixed

Definition at line 52 of file CDriveInformation.hpp.

const long Exponent::Host::CDriveInformation::CDRIVE_INFO_NETWORK_DRIVE = DRIVE_REMOTE`[static]`

Drive is remote (network)

Definition at line 53 of file CDriveInformation.hpp.

const long Exponent::Host::CDriveInformation::CDRIVE_INFO_RAM_DRIVE = DRIVE_RAMDISK`[static]`

Drive is a ram disk

Definition at line 55 of file CDriveInformation.hpp.

const long Exponent::Host::CDriveInformation::CDRIVE_INFO_REMOVEABLE_DRIVE = DRIVE_REMOVABLE`[static]`

Drive is removeable

Definition at line 51 of file CDriveInformation.hpp.

const long Exponent::Host::CDriveInformation::CDRIVE_INFO_UNKNOWN_DRIVE = DRIVE_UNKNOWN`[static]`

Unknown unit

Definition at line 49 of file CDriveInformation.hpp.

const long Exponent::Host::CDriveInformation::CDRIVE_INFO_UNMOUNTED_DRIVE = DRIVE_NO_ROOT_DIR`[static]`

Unmounted drive

Definition at line 50 of file CDriveInformation.hpp.