从黑莓设备获取所有图像名称

发布于 2024-12-17 20:30:12 字数 199 浏览 7 评论 0原文

有没有办法迭代黑莓设备中存储的所有图像。我看过这个示例它迭代整个文件系统并扫描每个文件。我想知道是否有更便宜的方法可以做到同样的事情。直接查看图像目录的东西? 谢谢

Is there any way to iterate through all images stored in a blackberry device. I have seen this example which iterates over the whole file system and scans each file. I am wondering is there any cheaper way of doing the same. Something that directly looks into the image directory?
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时常饿 2024-12-24 20:30:12

使用System.getProperty(String key)可以获取设备上的图像存储目录:

  1. Key“fileconn.dir.memorycard.photos”。返回 SD 卡上存储照片的默认目录。它应该类似于“file:///SDCard/BlackBerry/pictures/”。

  2. 键“fileconn.dir.photos”。返回设备内存上存储图片的默认目录。它应该类似于“file:///store/home/user/pictures/”。

知道这些位置后,您可以迭代其中的图像,而不是扫描整个文件系统。可以使用 FileConnection 列出图像 API。具体看一下list(String filter, boolean includeHidden)方法。

Using System.getProperty(String key) it is possible to get image storage dirs on device:

  1. Key "fileconn.dir.memorycard.photos". Returns default directory for storing photos on SD Card. It should be something like "file:///SDCard/BlackBerry/pictures/".

  2. Key "fileconn.dir.photos". Returns default directory for storing pictures on device memory. It should be something like "file:///store/home/user/pictures/".

Knowing these locations you can just iterage images inside of them, rather than scanning the whole file system. It is possible to list images using the FileConnection API. Specifically take a look at list(String filter, boolean includeHidden) method.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文