Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User ajitnair's Avatar
    Join Date
    Nov 2006
    Posts
    15
    Hello,

    I have a signed midlet that attempts to create a directory in the file system by first obtaining a list of root directories using the FileSystemRegistry class.

    I've tried this on two Nokia phones the N71 and the N75 and what I'm seeing is that the operation of creating the directory works fine as long as it tried to create the directory on the external memory card but not on the local file system.

    So if I try to create a directory called TestDir like so,
    file:///Memory card/TestDir/ - this works, but this,
    file:///Phone memory/TestDir/ - does not work. I get an "Access Denied" exception, even though the midlet is signed and I have configured the application to have access to read and write user data.

    Should I be using one of the localized directory (Nokia specific directories) instead? I'd prefer not to use a manufacturer specific system property in order to figure out where to create the directory.

    Anyone know why the "Phone memory" root would not give access to create the directory?

    Thanks.

    Ajit

  2. #2
    Nokia Developer Champion balagopalks's Avatar
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,427
    I have tried this path previously and worked fine for me. file:///c:/Nokia/Sounds/TestDIR/
    Also try with canWrite()of FileConnection. It Checks if the file or directory is writable.

    Regards
    Gopal

  3. #3
    Registered User ajitnair's Avatar
    Join Date
    Nov 2006
    Posts
    15
    Did you use one of the Nokia specific system properties, like Fileconn.dir.tones, for example? Or did you know the path existed and used a hardcoded value?

    Thanks.

    Ajit

  4. #4
    Nokia Developer Expert dcrocha's Avatar
    Join Date
    Jun 2005
    Posts
    923
    Should I be using one of the localized directory (Nokia specific directories) instead?
    That's precisely what you should do. The FileConnection API document details the reasons behind the use of the Nokia-specific properties, main one being that some kinds of traversal may not be allowed in some devices/platforms, which will cause security exceptions like the one you're getting.

    Daniel

Similar Threads

  1. Strange problem with compilation!!! ARM9E
    By dmazgalin in forum Symbian C++
    Replies: 1
    Last Post: 2007-11-02, 09:33
  2. 860726 - Getting started with Carbide C++
    By ilostmyid2 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 6
    Last Post: 2007-10-24, 06:05
  3. Problem in build with S60 1FP
    By Manuelito_ in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2007-09-18, 12:08
  4. creating Directory
    By gaurav17281 in forum Symbian C++
    Replies: 2
    Last Post: 2003-10-15, 09:51
  5. abld make files missing
    By dalore in forum Symbian C++
    Replies: 0
    Last Post: 2003-06-13, 12:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved