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

Reply With Quote

