Tuesday, May 02, 2006

Reading and Writing files to the SD card on the a780

Just in case you needed to read/write files to the SD card on the a780, I just came across how to do that today. It's not really documented anywhere although if you use the "listRoots()" method you can find it out. Note that it's "SD" and not "SDCard" as the JSR would lead you to believe.

FileConnection sc = (FileConnection)Connector.open("file:///SD/myFile.txt");
OutputStream os = sc.openOutputStream();