×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    105

    obtain application private directory

    Hi,

    I want to store some files in the application 's private directory.

    How to I obtain that path from my Qt application?

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: obtain application private directory

    Just a guess, could it be rootPath?
    http://doc.qt.nokia.com/4.6/qdir.html#rootPath

  3. #3
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: obtain application private directory

    Just access the file, with no directory specified. The application's initial current directory is the private directory.

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: obtain application private directory

    Quote Originally Posted by danhicksbyron View Post
    Just access the file, with no directory specified. The application's initial current directory is the private directory.
    Then it should be currentPath()
    http://doc.qt.nokia.com/4.6/qdir.html#currentPath

  5. #5
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: obtain application private directory

    Hi,
    I use this:
    QFile prefFile(QDir::currentPath() + "/prefs.tmgn");

    It works for me so far.

    Tam
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  6. #6
    Registered User
    Join Date
    Apr 2008
    Posts
    105

    Re: obtain application private directory

    currentPath works.. thanks!

  7. #7
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: obtain application private directory

    Hi,
    it was a pleasure!

    All the best
    Tam Hanna
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

Similar Threads

  1. Access to private directory?
    By danhicksbyron in forum Symbian
    Replies: 6
    Last Post: 2010-06-03, 22:10
  2. Private directory
    By MrAlt in forum Symbian
    Replies: 9
    Last Post: 2009-10-19, 15:33
  3. Replies: 8
    Last Post: 2009-09-15, 11:45
  4. Where the private directory on the emulator ?
    By serg3d in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2009-08-17, 14:21
  5. How to obtain installation directory?
    By ianratcliffe in forum Symbian
    Replies: 2
    Last Post: 2005-04-25, 11:46

Posting Permissions

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