How to check free space on memory card
2011-08-20 03:30
337 查看
LOCAL_C void Main1L() { RFs fileSession; TVolumeInfo volumeInfo; //open RFs session fileSession.Connect(); //freeSpace will store number of free memory card in Bytes TBuf<64> freeSpace; TInt64 freeKBytes; //Contains drive information. TDriveInfo driveInfo; //check all drives from A to Z for (TInt driveNumber=EDriveA; driveNumber<=EDriveZ; driveNumber++) { //Gets information of this drive fileSession.Drive(driveInfo,driveNumber); //if this drive is EMediaNANDFlash,we find drive of Memory card // also reported my DiBo Members that on some devices it can be EMediaHardDisk // ref: [http://discussion.forum.nokia.com/forum/showthread.php?t=156990] if(driveInfo.iType == EMediaHardDisk) { //recode its free space in bytes fileSession.Volume(volumeInfo,driveNumber); freeKBytes = volumeInfo.iFree/1024/1024/1024; freeSpace.Num(freeKBytes); break; } } //close RFs session fileSession.Close(); console->Write(freeSpace); }
//necessary header file
#include <f32file.h>
//for test How to check free space on memory card
LIBRARY efsrv.lib
相关文章推荐
- How to check graphics card on Linux
- How To Reclaim Wasted Space on The Segment (Table, Index and LOB) and Tablespace Levels (文档 ID 16827
- How to build CrystalSpace + CEL + Ares on Ubuntu
- How to get the kernel memory range on OpenSolaris
- How to check iscsi issue on Nexenta
- 5 commands to check memory usage on Linux
- How to host WordPress for free on AWS
- Open-Xchange on FreeBSD HOWTO
- how-to: resolve "java.lang.OutOfMemoryError: Java heap space" during using beeline && hiveserver2
- How to reclaim space in InnoDB when innodb_file_per_table is ON
- How to install Ubuntu on low memory systems
- How To Install Speedtest-cli On a CentOS / RHEL / Scientific / Fedora Linux To Check Internet Speed
- 7 Ways To Free Up Hard Disk Space On Windows
- How to fix the dreaded "java.lang.OutOfMemoryError: PermGen space" exception (classloader leaks)
- How to access PCI configure space on OpenSolaris
- 海洋工作室——网站建设专家:How to check the SQL statement execute time on SQL Server ?
- How to transport a tablespace from 10g ASM on Windows to 11g ASM on AIX
- JavaCard free memory detect (how much memory left)
- virtual memory layout and how to get it by the correspoinding functuon
- How To Reclaim Wasted Space on The Segment (Table, Index and LOB) and Tablespace Levels (文档 ID 16827