BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-13-2007, 11:48 PM   #1 (permalink)
New Member
 
jeoff's Avatar
 
Join Date: Feb 2007
Model: 8700
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how to access files in 8100 simulator

Please Login to Remove!

I'm trying to open a file using
FileConnection fc = null;

fc = (FileConnection)Connector.open("file:///SDCard/Test.txt");
InputStream is = fc.openInputStream();

but I get "File Not Found".

I've used FileSystemRegistry.listRoots() to see the my device has a store/ root and an SDCard/ root.

I've found a file on my hard drive called 8100-sdcard.dmp in C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0\simulator.

I've placed copies of my Test.txt file in c:\, C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0\simulator, and a whole spectrum of other good candidates of where it could possibly go.

I can't figure out where the SDCard/ root maps to. I assumed it was on the hard drive somewhere, but my guess now is that it is in 8100-sdcard.dmp. I somehow have to load my file into that file??? Does anyone know how?

Nothing seems to work. Does anyone know how to access a file that is not in a resource file?

TIA.
Offline  
Old 02-14-2007, 03:38 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i've had the same problem - as you've discovered the simulator uses a disk image to emulate the sdcard rather than just a directory on the pc. i tried downloading files through the simulator onto the emulated sdcard but i got an network access password prompt.

i just resorted to testing code on device!
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-15-2007, 05:23 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2005
Location: Mumbai, India
Model: 8100
Carrier: Airtel
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Initially I also faced same problem, but after reading sample code its very easy to perform various file operations.
Please Visit Sample Code....
Offline  
Old 02-15-2007, 06:06 AM   #4 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

that's not the issue chetan - it's emulating the sd thorough the simulator - not coding it.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.