Get private path in Qt

From Qt Wiki
Jump to navigation Jump to search

Template:ArticleMetaData

Template:Abstract

Description[edit | edit source]

Symbian applications store their data in a secure area, known as a "private directory", or data cage. Other applications cannot read/write this folder unless they have the manufacturer capability 76ytuiytuityutyutututyutyutyu - this is hard to obtain.

The private directory is located at \private\<sid>, where the SID is a special identifier that is unique to the application (usually the same value as the application UID). In Qt you will get full path of private folder using 76ytuiytuityutyutututyutyutyu method or 76ytuiytuityutyutututyutyutyu. Either method returns the absolute path of the application's current directory.


Source code /* This method will return private path as C:/Private/ed8788dc assuming application installed on c drive and has UID ed8788dc */ QString myPrivateDirectory (QDesktopServices::storageLocation (QDesktopServices::DataLocation)); or /* This method will return private path as C:/Private/ed8788dc assuming application installed on c drive and has UID ed8788dc */ QString privatePathQt(QApplication::applicationDirPath());

Converting path from Qt format to Symbian format[edit | edit source]

In pure Qt applications you can use the returned path directly. If you need to interact with Symbian code then you will need to read Converting between Qt and Symbian Directory Separators.

References[edit | edit source]