黑莓模拟器文件系统:它在哪里?
我正在使用 javax.microedition.io.file 包写入 Blackberry 上的文件系统来测试一些内容。我能够打开一个文件(“file:///store/home/user/documents/mytxtfile.txt”)并写入它(我的意思是,无论文件是否创建,都不会引发异常写了,我也说不出来)。
我正在模拟器中运行,我想知道模拟器会在哪里写入这些文件?查看模拟器目录,发现任何文件都没有更改,因此自写入该文件以来,没有任何 .dmp 文件发生更改。有谁知道这个文件将被写入哪里,以便我可以确认它确实被写入?
I am testing some stuff out with writing to the filesystem on the Blackberry using the javax.microedition.io.file
package. I am able to open a file ("file:///store/home/user/documents/mytxtfile.txt") and write to it (by that I mean that no exception is thrown, whether or not the file is created and written, I can't tell).
I am running in a simulator and I was wondering where the simulator would write such files? Looking in the simulator directory there has been no changes to any of the files, so none of the .dmp files have changed since this file was written. Does anyone know where this file would be written, just so that I can confirm that it was actually written?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,BlackBerry 文件系统在主机系统上表示为单个文件。您将在模拟器目录中看到此文件,例如 8900-fs.dmp(例如,对于 8900 模拟器)或 8900-sdcard.dmp(对于同一设备的虚拟 SD 卡上的文件系统)。
遗憾的是,您无法浏览存储到模拟器设备文件系统中的文件,但您可以将模拟器配置为使用其 SDCard 的实际目录。它位于模拟器对话框的“内存”选项卡中(如果您使用的是 Eclipse JDE 插件,则位于“调试配置 -> 模拟器”下)。您可以使用 file:///sdcard 前缀写入 SDCard
另一种选择是 BlackBerry 内置有一个文件浏览器 - 它(不直观地)位于“媒体”图标下方。单击“媒体”图标,然后打开菜单,其中有一个“浏览”菜单项。您将能够浏览模拟器的文件系统并查看您的文件是否在那里。
By default the BlackBerry filesystem is represented as a single file on the host system. You'll see this file in your simulator directory, something like 8900-fs.dmp (for the 8900 simulator, for example) or 8900-sdcard.dmp (for the filesystem on the virtual SD card for the same device).
Unfortunately you can't browse files stored to the simulator's device filesystem, but you can configure the simulator to use an actual directory for its SDCard. This is in the Memory tab of the simulator dialog (under Debug Configurations -> Simulator if you're using the Eclipse JDE Plug-in). You can write to the SDCard using the file:///sdcard prefix
Another option is that there is a file browser built in to the BlackBerry - it's (unintuitively) under the 'Media' icon. Click the Media icon, then open the menu and there's an Explore menu item. You'll be able to browse the simulator's filesystem and see if your file is there.