01-14-2009 06:48 PM
So I'm doing something like this:
case FileSystemJournalEntry.FILE_ADDED:
String path = entry.getPath();
Then I do a: (FileConnection)Connector.open("file:///" + path)
What's weird is that the path that the code sees is this: file:////SDCard/BlackBerry/pictures/whatever.jpg
(it throws a net.rim.device.api.io.file.fileIOException: File system error)
If I bring up the image, and look its properties, it says: /Media Card/BlackBerry/pictures/whatever.jpg
I'm guessing the problem is:
a) I have too many forward slashes in my file address
b) There is some black magic regards to why /Media Card/ and /SDCard/ seem to be at odds with eachother?
Thanks so much!
Solved! Go to Solution.
01-14-2009 06:58 PM - edited 01-14-2009 06:59 PM
So now I my code is trying to access file://SDCard/BlackBerry/pictures/whatever.jpg (still no love; I catch an exception after this).
So... /SDCard/ == /Media Card/ ? -_-
01-14-2009 07:35 PM
There should be exactly 3 slashes... 2 for the protocol: "file://" and 1 that indicates the top level file system: "/SDCard". "Media Card" is just an pretty alias that you see when using the built-in apps.
"file:///SDCard/something..." should be correct.
01-14-2009 08:02 PM