Categories: Code Examples | Symbian C++ | S60 | How To | Hardware | Base/System
This page was last modified 09:01, 9 December 2007.
How to get drive size
From Forum Nokia Wiki
RFs myFs; User::LeaveIfError( myFs.Connect() ); TInt driveIndex; if( RFs :: CharToDrive( 'C', driveIndex ) == KErrNone ) { TDriveInfo driveInfo; if( myFs.Drive( driveInfo, driveIndex ) == KErrNone ) // size defined only for formattable drives if( driveInfo.iMediaAtt & KMediaAttFormattable ) { TVolumeInfo volumeInfo; if( myFs.Volume( volumeInfo, driveIndex ) == KErrNone ) { // now we can get drive size info TInt64 driveTotalSize = volumeInfo.iSize, driveFreeSize = volumeInfo.iFree; } } } myFs.Close();
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help me understand the return values of HALData | olfasupcom | General Symbian C++ | 3 | 2007-05-18 11:06 |
| C++ Dev Env and Protected Access Areas | enrico.miglino | Carbide.c++ and CodeWarrior Tools | 5 | 2006-10-30 11:47 |
| Buggy Carbide C++ v1.3 and EPOCROOT | omarfr | Symbian Tools & SDKs | 3 | 2008-04-16 13:22 |
| Amora 1.0: new release | savago | Python | 7 | 2008-04-27 00:42 |
| Problem installing S60 v3 sdk on Win 2k sp4 | GuusDavidson | Symbian Tools & SDKs | 5 | 2006-11-07 12:05 |
