How to get file system drive information using Symbian C++
This article shows how to use RFs::DriveList() to get an array containing a bitmap of attributes for all drives.
Article Metadata
Compatibility
Platform(s): All Symbian
Device(s): All Symbian
Platform Security
Signing Required: Self-Signed
Capabilities: None
Article
Created: vasant21
(30 May 2007)
Reviewed: hamishwillee
(02 Feb 2012)
Last edited: hamishwillee
(02 Feb 2012)
Code snippet
The drive list consists of an array of 26 bytes. Array index 0 corresponds to drive A, 1 equals B etc. The array member value is a bitmap of drive attributes, or 0 if there is no such drive. The following code prints each drive in the drive list as a letter, followed by the hex value of the integer indicating the drive's attributes.
#include <f32file.h>TDriveList drivelist;
TChar driveLetter; TInt driveNumber=EDriveA;
_LIT(KDrive,"%c: %02x ");
User::LeaveIfError(fsSession.DriveList(drivelist));
for(;driveNumber<=EDriveZ;driveNumber++)
{
if (drivelist[driveNumber])
{
User::LeaveIfError(fsSession.DriveToChar(driveNumber,driveLetter));
console->Printf(KDrive, TUint(driveLetter), drivelist[driveNumber]);
}
}


12 Sep
2009
This article had explained about how to get drive information Use RFs::DriveList() to retrieve an array of drives. The drive list consists of an array of 26 bytes. Array index zero corresponds to drive A, one equals B etc. The array member value is a bitmap of drive attributes, or 0 if there is no such drive.
this article help full to beginners