09-09-2010 10:53 PM
Hi Peter,
Would you please explain what do you mean by "hey don't have anything else in the same place"?
After I choosing a location for SD card, there would be directories like 'audiobooks', 'documents' , 'music' etc.
Do you mean in such situation the writing file action doesn't work?
09-10-2010 01:48 AM
Problem solved.
Seems it doesn't work because I set my app as auto-run on startup. At that point, the SDCard is not inserted yet. It needs a while for the SDCard to load.
06-12-2011 10:40 PM
The follwing code that is about writes files is from my app and is just a part of whole codes.
So u need to make other codes with blow codes. (i.e. try-catch things and make approprite variables things)
---
FileConnection fc = (FileConnection)Connector.open(protocol + filePath + fileName);
if (!fc.exists())
{
fc.create(); // create the file if it doesn't exist
}
OutputStream outStream = fc.openOutputStream();
outStream.write(strFileContent.getBytes());
outStream.close();
fc.close();
--
My variable "protocol" is "file://" and filePath is "/SDCard/BlackBerry/"
The above codes can be the answer for u maybe.
thanks!