diff -r 4d198a32ac7d -r d4809db37847 plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0A0DE525-723F-45BD-9F10-76AAB4616426.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0A0DE525-723F-45BD-9F10-76AAB4616426.html Thu Aug 19 17:48:04 2010 -0700 @@ -0,0 +1,37 @@ + + +
Syntax:
+[int] sysinfo.drivefree(String drivename)+
Description:
+The drivefree
method can be used to detect the space available for memory storage on a device.
Argument:
+drivename
:
Specifies the name of a drive to be examined.
+ +Return value:
+If the drive exists, this method returns an integer value indicating the available space on the specified drive, measured in bytes.
+Example code:
+function checkDrivesInformation() { + var space = 0; + // get existing user's drives + var allDrives = sysinfo.drivelist; + var drives = allDrives.split(" "); + // read and print all drives’ name and information + for (var i=0; i<drives.length; i++) { + space = sysinfo.drivesize(drives[i]); + space /=1024; // convert from bytes to kB + alert("Total space of drive "+drives[i]+" ="+space+"kB"; + space = sysinfo.drivefree(drives[i]); + space /=1024; // convert from bytes to kB + alert("Free space of drive "+drives[i]+" ="+space+"kB"; + } + }+