×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    create a file 3rd edition; urgent!

    Hello,
    I want to create a file named mobi.db, which is the database of my app. I want to create it in the folder "z:\\resource\\apps\\" but it says me, when i trace my programm, "access denied". Where can i create my file?

    Please hlep me it's urgent...

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: create a file 3rd edition; urgent!

    You need AllFiles capability to do that. However, \resource is for resources and a database file is not a resource. You should rather place it in your folder under \private or anywhere else.

  3. #3
    Super Contributor
    Join Date
    Jun 2006
    Location
    Moscow, Russia
    Posts
    803

    Re: create a file 3rd edition; urgent!

    Read about data caging in your SDK documentation:
    Introduction to S60 3rd Edition >> S60 Platform 2nd Edition And 3rd Edition: Differences In Features
    Introduction to S60 3rd Edition >> Testing and Signing with Symbian Platform Security
    Regards,
    ivey

  4. #4
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: create a file 3rd edition; urgent!

    I have done what you sais whizard_hu_, but i have always an access denied error, mayble the problem comes from here
    Code:
    RESOURCE APP_REGISTRATION_INFO
      {
      app_file="mobifindit";
      localisable_resource_file =  STRING_mobifindit_loc_resource_file_1;
      localisable_resource_id = R_MOBIFINDIT_LOCALISABLE_APP_INFO;
    
      embeddability=KAppNotEmbeddable;
      newfile=KAppDoesNotSupportNewFile;
      }

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: create a file 3rd edition; urgent!

    Registration info has nothing to do with your problem. For avoiding KErrAccessDenied, you should try to write your own private folder (e.g. \private\3rd-UID-or-SID-of-your-app), not in someone else's. Also note, that the private\xxxx folder does not exist by default, you can create it with an RFs::MkDirAll (or just MkDir).

  6. #6
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: create a file 3rd edition; urgent!

    I read the doc indicated below, i must say that i am a little bit lost...
    Must i use Central Repository or does an other solution exists?
    Please help me... thanks!

  7. #7
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: create a file 3rd edition; urgent!

    This instrcution returns an "access denied" error too
    Code:
    TInt err2 = GetFs()->MkDir(_L("z:\\mob\\"));
    I have these capabilities:
    CAPABILITY AllFiles ReadUserData WriteUserData ReadDeviceData WriteDeviceData NetworkServices LocalServices
    ???

  8. #8
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Smile Re: create a file 3rd edition; urgent!

    Hello asmobease,

    If you have probem in creating a folder then following is the solution:

    Code:
    TBool CYrApp::CallCreate()
    {
           _LIT(KFolderPath,"\\Private\\10003a3f\\Kiran\\"); \\10003a3f belongs to Emulator
    
    	TBuf16<50> iFolderPath;
    	iFolderPath.Copy(KFolderPath);
    
    	RFs iFs;
    	iFs.Connect();
    
    	TInt iErr=iFs.MkDir(iFolderPath);
    	iFs.Close();
    	if(iErr==KErrNone)
    		return ETrue;
    	else
    		return EFalse;
    }
    Regards.
    Kiran.
    Last edited by kiran10182; 2006-09-29 at 11:02. Reason: Grammer

  9. #9
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: create a file 3rd edition; urgent!

    Thanks you very much, it works!
    I create a directory. But by default this directory is on "c" drive of the emulator.
    Is it important (it is not on the drive "z")?

    What is the path i must use for my device?

    Thanks for your help!

  10. #10
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: create a file 3rd edition; urgent!

    stupid question for the letter, i can't write on "z"...

  11. #11
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Smile Re: create a file 3rd edition; urgent!

    Hello asmobease,

    Z: is ROM, so i think you can't write on it.

    Better u use the "C:" or "E:" for yr application target.

    Regards.
    Kiran.

Similar Threads

  1. S60 3rd Edition SDK: Code bloat from AknsConstants.h
    By mgroeber9110 in forum Symbian
    Replies: 6
    Last Post: 2011-02-04, 10:41
  2. Replies: 6
    Last Post: 2006-10-31, 05:20
  3. Plea for Link Errors:Porting Code from Fp3 to 3rd Edition
    By mateen_maldar in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-05-17, 06:26
  4. How to create custom SIP header fields in S60 3rd edition
    By murkyl in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2006-03-21, 21:13
  5. Tips on using NDS 1.1
    By mitts in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-01-18, 16:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×