07-15-2008 01:10 PM
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
Please ensure that the BlackBerry Simulator has been configured to support a micro SD card. This is done in the BlackBerry JDE by clicking on the Edit menu, selecting Preferences, clicking on the Simulator tab, then the Memory tab and filling in the SD Card size and SD Card image parameters.
Solved! Go to Solution.
07-16-2008 01:29 AM
Hi Yog123,
If you go through my all the posts in this thread, you'll come to know that I was getting the same exception when I was trying to create a folder. I have also mentioned the problem and the solution for that as quoted below.
"I even tried to create a directory in /store/home/user/ and it's working fine. So, that means, we have to create our directories inside the /store/home/user or /SDCard/ directory."
Please let us know if you still find any problem.
Thanks,
- Rohan
07-16-2008 03:04 AM
hii
thnks for quick reply...
I tried to create folder using mkdir() in sdcard but it says i dnt have read/write access to that folder...
my coe snippet goes like this....
try {
FileConnection fconn = (FileConnection)Connector.open("file:///SDCard/Bla
boolean write= fconn.canWrite();
boolean read= fconn.canRead();
if (!fconn.exists())
{
fconn.mkdir(); // create the folder/file if it doesn't exist
}
is this valid code ......?
write and read always returns me false
and on mkdir() call code fails and gives me File System error...
thnks in advance................
07-16-2008 03:31 AM
Hi yog123,
The code you've mentioned is valid code, but I guess you're making a very small mistake here.
Whenever you want to create a directory, you should give "/" after the directory name inside Connector.open()
Just put "/" after the directory name "sp" in your code as shown below.
FileConnection fconn = (FileConnection)Connector.open("file:///SDCard/Bla ckBerry/pictures/sp/",Connector.READ_WRITE);
Please let us know if you still find any problem.
Thanks,
- Rohan
07-16-2008 06:11 AM
thnks alot......
it finally works......
07-16-2008 07:32 AM
Cheers!
![]()
Hi Mark,
I think now you can make this thread as "solved".
Thanks,
- Rohan
03-18-2010 02:08 AM
Thanks i am also able to create folder on SD Card
Now i like to know how to write text file in that folder
04-18-2010 09:57 PM
(Thought I'd try even thought this thread is ancient![]()
Hi- I'd like to make the directory
store/Device Memory/home/user/pictures/MDB/
on a Storm simulator 9530. I'm doing it one dir at a time. I get an Invalid Op file system error trying to create the Device Memory/ dir, even though it creates store/ just fine.
I would have thought store/Device Memory/home/user/ would exist already. How do I do this on the Storm and for Bold 9700 and Storm2 please?
Thanks
Justin D.
04-18-2010 10:02 PM
Everything up to the MDB should already exist. Make sure you have the card mouhnted in the simulator. You should not be able to access anything below the user folder from a third party app anyhow, if i remember correctly.
04-18-2010 10:12 PM
Hey thanks for that. Just tried to create a file
store/Device Memory/home/user/pictures/filename.jpg
on the Storm 9530 sim and got a FIle System Error- Invalid Operation.
Help!
J