Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
TDriveUnit Class Reference

Drive numbers and letters. More...

#include <f32file.h>

Public Member Functions

 TDriveUnit ()
 
IMPORT_C TDriveUnit (TInt aDrive)
 Constructor taking a drive number.
 
IMPORT_C TDriveUnit (const TDesC &aDrive)
 Constructor taking a drive letter.
 
IMPORT_C TDriveUnit & operator= (TInt aDrive)
 Assigns the drive number to the drive unit.
 
IMPORT_C TDriveUnit & operator= (const TDesC &aDrive)
 Assigns a drive letter to the drive unit.
 
 operator TInt () const
 Converts the drive unit to an integer value.
 
IMPORT_C TDriveName Name () const
 Gets the drive unit as text.
 

Detailed Description

Drive numbers and letters.

A drive may be represented by either an integer between zero and twenty five inclusive, or by a buffer descriptor containing a character between "A" and "Z" inclusive, followed by a colon. This class encapsulates both representations. An instance of this class is constructed specifying either the drive number or the drive letter and may be converted between the two representations.

API status
Published to all clients. Released API.

Definition at line 1753 of file f32file.h.

Constructor & Destructor Documentation

◆ TDriveUnit() [1/3]

TDriveUnit::TDriveUnit ( )
inline

Definition at line 1771 of file f32file.h.

◆ TDriveUnit() [2/3]

IMPORT_C TDriveUnit::TDriveUnit ( TInt  aDrive)

Constructor taking a drive number.

Parameters
aDriveThe drive number.

Panic condition: FSCLIENT 0 if aDrive is greater than or equal to KMaxDrives or less than 0.

(generated from Symbian Developer Library)

◆ TDriveUnit() [3/3]

IMPORT_C TDriveUnit::TDriveUnit ( const TDesC &  aDrive)

Constructor taking a drive letter.

Parameters
aDriveA descriptor containing text whose first character is the drive letter. Can be upper or lower case. Trailing text is ignored.

Panic condition: FSCLIENT 1 if the drive letter is invalid, i.e. does not correspond to a drive number.

(generated from Symbian Developer Library)

Member Function Documentation

◆ Name()

IMPORT_C TDriveName TDriveUnit::Name ( ) const

Gets the drive unit as text.

The drive letter is returned with a trailing colon.

Panic condition: FSCLIENT 0 if RFs::DriveToChar() returned an error.

(generated from Symbian Developer Library)

◆ operator TInt()

TDriveUnit::operator TInt ( ) const
inline

Converts the drive unit to an integer value.

(generated from Symbian Developer Library)

◆ operator=() [1/2]

IMPORT_C TDriveUnit & TDriveUnit::operator= ( const TDesC &  aDrive)

Assigns a drive letter to the drive unit.

The letter must be between A and Z or a panic is raised. Any trailing text within the descriptor is ignored.

Parameters
aDriveDescriptor containing text whose first character is the drive letter. It can be upper or lower case.

Panic condition: FSCLIENT 1 if the drive letter is invalid, i.e. does not correspond to a drive number.

(generated from Symbian Developer Library)

◆ operator=() [2/2]

IMPORT_C TDriveUnit & TDriveUnit::operator= ( TInt  aDrive)

Assigns the drive number to the drive unit.

Parameters
aDriveThe new drive number.

Panic condition: FSCLIENT 0 if aDrive is greater than or equal to KMaxDrives.

(generated from Symbian Developer Library)


The documentation for this class was generated from the following files: