The service offered by System Utils is accessed through the System Utils API.
Figure 1: SysUtil interface
SysUtil provides a static interface, which can be called directly without creating an instance of the class.
The methods of SysUtil API can be called independent of each other. The methods are static, there is no need to initialize SysUtil in any way before calling any of the methods of SysUtil API.
All methods of SysUtil API are synchronous. They can not be canceled.
None.
The following code shows an example of using the SysUtil class.
// check if the system FFS space goes below critical level if I write 8003 // bytes there TBool belowCL = SysUtil::FFSSpaceBelowCriticalLevelL( NULL, 8003 );
This class offers an API for applications to miscellaneous system utilities, such as getting software version information or language package version information.
This method returns the software version string.
Parameters:
Type | Name | Possible values |
TDes& | aValue | The returned version string. The size of the buffer should be KSysUtilVersionTextLength (currently 64). |
Return value:
KErrNone, if successful, or a Symbian OS standard error code.
This method returns the SW version with which the currently installed language package is compatible.
Parameters:
Type | Name | Possible values |
TDes& | aValue | The returned version string. The size of the buffer should be KSysUtilVersionTextLength (currently 64). |
Return value:
KErrNone, if successful, or a Symbian OS standard error code.
This method returns the version of the currently installed language package.
Parameters:
Type | Name | Possible values |
TDes& | aValue | The returned version string. The size of the buffer should be KSysUtilVersionTextLength (currently 64). |
Return value:
KErrNone, if successful, or a Symbian OS standard error code.
This method checks if the free FFS (internal Flash File System) storage space is or will fall below Critical Level (CL). This module defines the FFS drive letter. Critical level value is defined in Central Repository.
If parameter aBytesToWrite is not defined, this method checks if the system FFS space is already below Critical Level (CL).
Parameters:
Type | Name | Possible values |
RFs* | aFs | File Server session. Must be given if available in the caller. If NULL, this method creates a temporary session for a check, but then the check is more expensive. |
TInt | aBytesToWrite | Number of bytes the caller is about to write to FFS, if known by the caller beforehand. If the parameter is not supplied, the system default value is used to check if the current space is already below CL. |
Return value:
ETrue if storage space would go below CL after adding aBytesToWrite more data, otherwise EFalse. The method leaves on error (for example drive contains no media) with one of system-wide error codes.
This checks if the free MMC (MultiMedia Card) space is or will fall below Critical Level (CL). Critical level value is defined in Central Repository.
Parameters:
Type | Name | Possible values |
RFs* | aFs | File Server session. Must be given if available in the caller. If NULL, this method creates a temporary session for a check, but then the check is more expensive. |
TInt | aBytesToWrite | Number of bytes the caller is about to write to MMC, if known by the caller beforehand. If the parameter is not supplied, the system default value is used to check if the current space is already below CL. |
Return value:
ETrue if storage space would go below CL after adding aBytesToWrite more data, otherwise EFalse. EFalse if system has no MMC drive support.
The method leaves on error (for example drive contains no media) with one of system-wide error codes.
This is a generic method used to check if free drive storage space is or will fall below Critical Level (CL). Critical level values are defined in Central Repository.
Parameters:
Type | Name | Possible values |
RFs* | aFs | File Server session. Must be given if available in the caller. If NULL, this method creates a temporary session for a check, but then the check is more expensive. |
TInt | aBytesToWrite | Number of bytes the caller is about to write to disk, if known by the caller beforehand. If the parameter is not supplied, the system default value is used to check if the current space is already below CL. |
TInt | aDrive | Number of the drive to be checked. See TDriveNumber of f32file.H. |
Return value:
ETrue if storage space would go below CL after adding aBytesToWrite more data, otherwise EFalse.
The method leaves on error (for example drive contains no media) with one of system-wide error codes.
The interface is accessed through the sysutil.H (SysUtil). The binaries are linked to the SYSUTIL.DLL library.