×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    2

    Problem writing to C:/Data

    Hi,

    I have a problem creating a new directory in symbian 60 series on C:/Data or any other public place.
    It throws the exception: Access denied.
    When i use Phone memory/private/test it creates the directory in C:/Private/MIDlets/102033E6/[101143c7]/test

    I use the following block of code to create a directory:

    Code:
    FileConnection fc = null;
    String connection = "file:///C:/Data/test";
    try {
    fc = (FileConnection) Connector.open(connection);
    	if(!fc.exists()) {
    		fc.mkdir();
    	rootForm.append(new StringItem("Dirctory created succesfully:",connection));
           }	
           else {
             rootForm.append(new StringItem("Dirctory alerady   exists:",connection));
           }
    			}
    			catch (Exception e) {
    				rootForm.append(new StringItem("Error creating file/directory:",e.getMessage()));
    			}
    			finally {
    				if(fc!=null) {
    					try {
    						fc.close();
    					}
    					catch (IOException e) {
    						System.err.println("An error occured while trying to close the File connection");
    						e.printStackTrace();
    					}
    				}
    			}

    Can someone please help me?
    I'm searching posts for several days now without luck.

    Thanks,
    Josef

  2. #2
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Problem writing to C:/Data

    Hi,
    Can you try this. Give the file name to be created as
    "C:\\Data\\YourFileName.txt", thats how it is mentioned in Symbian C++.
    Maximus
    S60 Developer
    Impossible is nothing

  3. #3
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    166

    Re: Problem writing to C:/Data

    According to me you cannot write data in phone memory i have tried it several time but got same error this works fine on memory card

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    2

    Re: Problem writing to C:/Data

    Hi,

    I have found a semi solution.
    After reading the following article:

    http://www.forum.nokia.com/document/Java_ME_Developers_Library_v1/GUID-1128F1CF-887B-4D0D-B0AE-77982070821D.html


    I came to the understanding that i can't write files to c:\data.
    first i have found out that "file:///Phone memory" refers to "C:\Data". Than i came to the conclusion that i can only write directories/files to C:\data\Images folder or the application private folder. (I choose the first option....)

    Thanks for your help
    Josef

Similar Threads

  1. some problem in firmware 6680 V 5.04.07
    By man2007 in forum Symbian
    Replies: 1
    Last Post: 2007-01-26, 17:36
  2. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  3. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  4. About 6230 Bt Problem
    By eerkek in forum Bluetooth Technology
    Replies: 17
    Last Post: 2005-02-08, 12:33
  5. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36

Posting Permissions

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