Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 20:35, 8 December 2007.

How to get Drive Information

From Forum Nokia Wiki

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.

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]); 
   }
}
Related Discussions
Thread Thread Starter Forum Replies Last Post
S60 3rd Edition SDK Feature Pack 2 v1.1 Installer problems Martin_Rakhmanov Tools and SDK Feedback 7 2008-08-12 15:56
File paths mew1979 General Symbian C++ 2 2005-08-16 13:51
Wanted Technical Information on Virus samarth_shroff General Discussion 2 2005-11-10 15:11
Saving a Bitmap via CFbsBitmap mhenderson Symbian Media (Graphics & Sounds) 2 2007-01-19 06:57
issue to compile for target Nimes General Symbian C++ 13 2008-09-09 14:45
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZhardwareQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX