Categories: Symbian C++ | S60 | How To | Hardware | Code Examples
This page was last modified 07:20, 30 September 2008.
How to check disk drive storage space
From Forum Nokia Wiki
Checks if free disk drive storage space is or will fall below critical level using class SysUtil.
static IMPORT_C TBool SysUtil::DiskSpaceBelowCriticalLevelL ( RFs * aFs, TInt aBytesToWrite, TInt aDrive )
Include header: sysutil.h Link against: sysutil.lib
aFs - File server session. Must be given if available, e.g. from EIKON environment. If NULL, this method will create a temporary session, which causes the method to consume more time and system resources.
aBytesToWrite - Number of bytes the caller is about to write to disk. If value 0 is given, this method checks if the current disk space is already below critical level.
aDrive - Identifies the disk drive to be checked. Numeric values for identifying disk drives are defined in TDriveNumber enumeration.
Example:
TInt dataSize = 500; if ( SysUtil::DiskSpaceBelowCriticalLevelL( &iFsSession, dataSize, EDriveC ) ) { // Can not write the data, there's not enough free space on disk. ... } else { // It's ok to actually write the data. ... }
Warning Note that this method, and all methods in SysUtil return -46 (KErrPermissionDenied) on some firmware versions of the Nokia N80 (see here for more).
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Visual C++ 6.0 hang when create new project | sumn79 | General Symbian C++ | 5 | 2003-12-05 09:23 |
| RMS Capacity Solution Nokia 3500 | osilvab | Mobile Java General | 4 | Yesterday 18:43 |
| What is my phone's path? How does my PC see it? | johnniewalker | General Discussion | 9 | 2008-01-04 16:43 |
| Memory Card vs Internal Memory | KlaarMobileEntertainment | General Symbian C++ | 7 | 2006-07-15 20:46 |
| Problem with user include Paths in WINSCW C/C++ Compiler | mjoachimiak | Carbide.c++ and CodeWarrior Tools | 3 | 2006-12-13 15:34 |
