Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 05:44, 27 November 2007.

How to get private directory

From Forum Nokia Wiki

Platform Security introduces the data caging concept. There are some folders on Symbian OS v9 that can only be accessed with certain privileges. The private folder, \private\<sid>, is one of them. It is a folder where an application can store sensitive data. Other applications, except the one with AllFiles capability, cannot read/write to the folder.

The <sid> is the Secure ID of the application. It is defined in the .mmp file. The following example shows how to get the path of the private folder of an application. For example, if an application has SID of 0x20001978, the private folder would be \private\20001978. The function that is used to get the private folder is RFs::PrivatePath().


Example

const TInt KPathNameLength = 100;
TBuf< KPathNameLength > pathWithoutDrive;
TBuf< KPathNameLength > driveAndPath;
TBuf< 2 > appDrive;
 
// Get application's private path
//   This is e.g. '\Private\20001978\'
//   Does not contain drive.
iEikonEnv->FsSession().PrivatePath( pathWithoutDrive );
 
// Extract drive letter into appDrive:
appDrive.Copy(CEikonEnv::Static()->EikAppUi()->Application()->AppFullName().Left(2));
 
// Combine drive letter and private path
driveAndPath.Copy(appDrive);
driveAndPath.Append(pathWithoutDrive);
 
// Now driveAndPath contains e.g. 'E:\Private\20001978\'
Related Discussions
Thread Thread Starter Forum Replies Last Post
Standalone app and icons file (mif) location y.a.k Python 1 2008-06-24 15:44
Error: "Unable to install" neeraj_star2004 Symbian Signing, Certification and Security 11 2007-09-28 14:21
Scan and read inbox in 3rd phone, need Capabilities? Wah General Symbian C++ 19 2006-09-26 10:38
cash csh07950 Developer Resources Feedback (Documentation, Examples, Training) 1 2007-08-20 18:44
Creating a GPRS access point adinkesp Symbian Networking & Messaging 4 2007-09-09 20:13
 
Powered by MediaWiki