How to Deploy and Use Files in Application Private Directory for Symbian

From Qt Wiki
Jump to: navigation, search
IMPORTANT: The content of this page is outdated. Reason: The Symbian platform is no longer supported.
If you have checked or updated this page and found the content to be suitable, please remove this notice.

How to Deploy and Use Files in Application Private Directory for Symbian

Private Directory

Symbian platform security model defines that each application has a private directory which name depends on the application UID. Only the application itself (and backup software) has read and write access to this directory.

File Deployment

The DEPLOYMENT keyword have to used at pro file to deploy file to the private directory of the application.

The example shows how to copy test.txt from the local directory of the project to the private directory of the application on Symbian device. test.sources = "test.txt" test.path = . DEPLOYMENT = test

Please note that path should be change if you want to deploy the file on another location or in a sub folder.

Using Files Located at the Application Private Directory

After installation on a Symbian device the file will be located in the application private dir which can be obtained using QApplication::applicationDirPath()

  1. include <QApplication>

  • Open file

//generate the file path QString sFile = QApplication::applicationDirPath() "/test.txt"; QFile file(sFile); //Open the file if ( | QIODevice::Text)) {

//Do something


See Also

Symbian Platform Security Model Using the DEPLOYMENT keyword in a Qt package file